You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Can't use method to generate route paths with compiler-cli #10731
Error: Error encountered resolving symbol values statically. Calling function 'generateRoute', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol
generateRoute generates a Route by name defined by the backend API. On each locale the route name can differ. If it has to be static, we were required to create seperate builds for each locale.
Expected/desired behavior
Don't require the path to be known by ngc. Why does it have to? Does compile cli generate a custom router for the given routes?
Activity
sod commentedon Aug 15, 2016
Here is what worked with both, JIT and AoT:
{provide: ROUTES, multi: true, useFactory: _routes}.Sadly the
ROUTEStoken is not exported from@angular/routerbut instead fromimport {ROUTES} from '@angular/router/src/router_config_loader';.Could you make it public? Or instead make
RouterModule.forRootto also accept factories?sod commentedon Aug 15, 2016
Closing as I might just as well create a pull request later.
angular-automatic-lock-bot commentedon Sep 9, 2019
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.