Hello Sai
Thanks for this tutorial. I have a question for a line in above snippet. What does the below line do?
loadChildren: "../app/posts/posts.module#PostsModule"
We are referring to the posts.module.ts file just check out line 11 on posts.module.ts
A new addition in Angular6, we will be referring directly to the module like loadChildren:() => PostsModule();
You won't getting lazy loading if you do it this way (as you will be adding the reference).
You can do this way. Just remove pair of braces. loadChildren:() => PostsModule
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hello Sai
Thanks for this tutorial. I have a question for a line in above snippet. What does the below line do?
loadChildren: "../app/posts/posts.module#PostsModule"
We are referring to the posts.module.ts file just check out line 11 on posts.module.ts
A new addition in Angular6, we will be referring directly to the module like
loadChildren:() => PostsModule();
You won't getting lazy loading if you do it this way (as you will be adding the reference).
You can do this way. Just remove pair of braces.
loadChildren:() => PostsModule