Open BruneXX opened 4 years ago
Hi new update:
I've managed to solve this, but now I'm experiencing no errors on compílation, but when I'm trying to access to the app I'm receiving the following error in the node console..
ERROR [Error]
So that's all.. there's no error description just that, any ideas what can be happening here?
well, I went a little further and found that it seems to be a problem with createTranslateLoader funciton but I'm not 100% sure, I've reviewed an old angular repo https://github.com/gilsdav/angular-universal-localize-router
and there's seems to be using a ManualParserLoader that apparently works.. so at least the app is up and running using that loader instead of the createTranslateLoader
If someone have a clue on this will be really appreciated since the localize-router documentation is not so clear how should be implemented in the universal apps..
I'm having the same problem when accessing localhost:4200.
TypeError: Class constructor SystemJsNgModuleLoader cannot be invoked without 'new' at new LocalizeRouterConfigLoader (:4200/vendor.js:176186) at _createClass (:4200/vendor.js:91249) at createProviderInstance (:4200/vendor.js:91210) at initNgModule (:4200/vendor.js:91116) at new NgModuleRef (:4200/vendor.js:92226) at createNgModuleRef (:4200/vendor.js:92209) at Object.debugCreateNgModuleRef [as createNgModuleRef] (:4200/vendor.js:104419) at NgModuleFactory_.create (:4200/vendor.js:105552) at :4200/vendor.js:100252 at ZoneDelegate.invoke (:4200/polyfills.js:10931)
LocalizeRouterModule.forRoot(routes, {
parser: {
provide: LocalizeParser,
useFactory: (translate, location, settings, http) =>
new LocalizeRouterHttpLoader(translate, location, settings, http),
deps: [TranslateService, Location, LocalizeRouterSettings, HttpClient]
}
})
so, changing tsconfig.json target from esnext to es5 and module to es2015 fixed it for me.
Hi @Tyranwyn are you using Angular Universal too?
No I am not
I'm submitting a ... (check one with "x")
Description
I've downloaded the demo of localized-router to check the configuration, I've reviewed a lot and after my configuration I'm receiving this error:
I saw that in demo you're using angular 6 could this be an issue related to angular 8? thanks
🌍 Your Environment
Angular Version: 8.2.5
Localize Router Version: 2.0.0-RC.3