Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module lazy loading compile issue when single lined #1930

Closed
onhate opened this issue Jul 4, 2018 · 3 comments
Closed

Module lazy loading compile issue when single lined #1930

onhate opened this issue Jul 4, 2018 · 3 comments

Comments

@onhate
Copy link

onhate commented Jul 4, 2018

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
Copy link
Author

onhate commented Jul 4, 2018

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
Copy link
Collaborator

ardatan commented Jul 10, 2018

This is about the replacement code, Thank you for contribution!

@ardatan
Copy link
Collaborator

ardatan commented Nov 30, 2018

Duplicate with #1956

@ardatan ardatan closed this as completed Nov 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants