Closed anand-ma closed 6 years ago
Are you sure this is due to ng2-translate
? Try removing TranslateModule.forRoot
from the AppModule
and try again.
@SamVerschueren you are right, i'm getting the same error after removing. But do you have any suggestions on this anyway?
I had a similar issue. Fixed it by changing:
@Inject(forwardRef(() => FrameComponent)) private translate: TranslateService, private cookieService: CookieService, private dataService: DataService, public app:FrameComponent) {}
To
@Inject(forwardRef(() => FrameComponent)) public app:FrameComponent, private cookieService: CookieService, private translate: TranslateService, private dataService: DataService) {}
Notice "translate" was just after "@Inject" ...
I'm submitting a ... (check one with "x")
Current behavior webpack: bundle is now INVALID. webpack: wait until bundle finished: /index.html Hash: 63e75ff62ec19674e859 Time: 7591ms chunk {0} styles.bundle.css, styles.bundle.map, styles.bundle.map (styles) 76.7 kB {3} [initial] chunk {1} main.bundle.js, main.bundle.map (main) 11.8 kB {2} [initial] chunk {2} vendor.bundle.js, vendor.bundle.map (vendor) 4.08 MB [initial] chunk {3} inline.bundle.js, inline.bundle.map (inline) 0 bytes [entry]
ERROR in Cannot read property 'map' of undefined, resolving symbol AppModule in C:/Users/507644/Workspace/ATT/shared/firstnet-shared/src/app/app.modul e.ts, resolving symbol AppModule in C:/Users/507644/Workspace/ATT/shared/firstnet-shared/src/app/app.module.ts webpack: bundle is now VALID.
Expected/desired behavior
Reproduction of the problem If the current behavior is a bug or you can illustrate your feature request better with an example, please provide the steps to reproduce and if possible a minimal demo of the problem via https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:btpW3l0jr5beJVjohy1Q). run ng serve
What is the expected behavior?
What is the motivation / use case for changing the behavior?
Please tell us about your environment: app.module.ts
angular cli
ng2-translate version: x.x.x
"ng2-translate": "^5.0.0",
Angular version: 2.0.0-rc.X "@angular/core": "^2.3.1",
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
Language: [all | TypeScript X.X | ES6/7 | ES5]