Repository navigation
Conversation
|
Related issue #10731 |
407e994 to
7e32def
Compare
To provide routes as factory like `{provide: ROUTES, multi: true, useFactory: _routes}` where `_routes` is a function that returns `Routes`
7e32def to
9b9a13b
Compare
|
@vsavkin may I export the token? or is there an alternative? |
|
I think this is more complicated. The reason why Are you saying that you would like to generate a list of routes dynamically? If so how can the template compiler know which of the components should be compiled? (Also if you make something public we need documentation for it.) |
|
Actually I just want to generate the URLs in runtime. A property that the AoT doesn't touch, but throws an error anyway :( |
|
This works for now (rc.6) :D import {RouterModule, Routes, __router_private__} from '@angular/router';
/* ... */
{provide: __router_private__.ROUTES, multi: true, useFactory: _routes}, |
|
No, doesn't work. I guess I just surrender and write the routes statically into javascript for now. |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
What is the current behavior? (You can also link to an open issue here)
If you want to define your routes by a factory that
compile-cliaccepts, you can't use the bundles as the ROUTES token is not public.What is the new behavior?
Does this PR introduce a breaking change? (check one with "x")