core: Does not work with angular universal
I’m submitting a … [x ] bug report
Error output
ORIGINAL EXCEPTION: This method is not implemented in Parse5DomAdapter: Parse5DomAdapter#getCookie
Please tell us about your environment:
-
OS: Mac OS X Sierra 10.12.1
-
Node: v6.9.1
-
NPM: v3.10.8
-
angular2-universal: v2.0.11
-
ng2-translate version: 4.2.0
-
Angular version: 2.1.0
-
Browser: All
-
Language: TypeScript 2.0.3
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 23
for anything that depends on HttpModule make sure you include it before UniversalModule
@cristiancamiloperezlopez I dont need to put the universalmodule at the end of the array… Just do this:
https://github.com/angular/universal-starter/issues/263
Basically you need to implement your own loader for the server side… in the app.browser just import all normally and in the app.node put the ngx translate in the imports arry using your own loader as in the example
Here is what I used for a project with universal: https://gist.github.com/ocombe/8af9d555ab2da45cd1042ef2ccb0ef6b
This is with universal for angular 2.1.2 and ng2-translate 4.1.0, you can migrate it to ngx-translate, it shouldn’t be too difficult.
I haven’t tried universal in angular 4 yet, a lot of things have probably changed.