Closed elvisbegovic closed 7 years ago
Try to install beta 22-1
. 22
was never released and was blocked during testing in experimental.
The generate error for your initial code was essentially caused by un-explicitly typed variable "routing".
Update to this line and it will be fine. export const routing: Routes = RouterModule.forRoot(APP_ROUTES);
I think routing isn't Routes type, only APP_ROUTES is. but if I add type ModuleWithProviders it works ! And the problem is I don't understand why need specify type while type are optionals in TS maybe ts bug...
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
OS?
Versions.
Repro steps.
The log given by the failure.
I just update my cli from 19-3 to 22 and very identically app is inside I override my file with ng init
It seems problem is in my imports in app.module.ts; I import my routes like this :
and my file looks like:
So before in 19-3 it works but now when I run ng serve, the cli compile completly but before
webpack:bundle is now VALID
I have this error aboveAnd the strange behavior is when I remove this routing from imports, it blocking at 20% without any reaction without any error !
Please apologize but updating cli is every time BIG CHALLENGE ! always errors by example above I don't understand why this ModuleWithProviders tell me it's using from external module!
Update
Ok I don't understand this code was working before but I find solution for this version of angular simply export RouterModule like this:
Was Insignifiant message error don't help me to find this solution