Module lazy loading compile issue when single lined
onhate opened this issue · 3 comments
onhate commented
Using latest example code for lazy loading, just changed the client/imports/app/app.module.ts
from multi line to single line route configuration.
from
{
path: 'todoAdd',
loadChildren: './todo-add/todo-add.module#TodoAddModule',
data: {
title: 'Add Todo'
}
}
to
{ path: 'todoAdd', loadChildren: './todo-add/todo-add.module#TodoAddModule' }
how to reproduce:
git clone https://github.com/onhate/angular-meteor-lazy-loading-single-line-issue
cd angular-meteor-lazy-loading-single-line-issue
npm install
npm start
And you will see the following error:
=> Errors prevented startup:
While building for web.browser:
client/imports/app/app.module.js:24:154: Unexpected token (24:154)
While building for web.browser.legacy:
client/imports/app/app.module.js:24:154: Unexpected token (24:154)
=> Your application has errors. Waiting for file change.
onhate commented
I have just discovered that it may not be related to the fact that it's single lined, but that it's missing the data element.
ardatan commented
This is about the replacement code, Thank you for contribution!