Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upng xi18n throws exception 'ERROR in Cannot read property 'loadChildren' of undefined' when route data contains an arrow expression #37776
Labels
Milestone
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is this a regression?
Reported on 10.0.0.
This also happens in 9.x
Description
ng xi18n reports the following:
ERROR in Cannot read property 'loadChildren' of undefinedhttps://github.com/rsivan/route-error
Angular Version:
Anything else relevant?
The root cause appears to be using an arrow expression in a route definition.
Note that the application compiles and runs correctly, just xi18n fails.
{ path: 'view1', component: View1Component, data: { permission: (r: any) => r.guide > 0 }},removing the arrow expression fixes the issue.