Angular 2 Lazy Loading

Angular 2 - What is Lazy Loading and How to enable Lazy Loading?

What is lazy loading and How to enable lazy loading in angular 2?

Lazy Loading - Lazy loading enables us to load only the module user is interacting and keep the rest to be loaded at run-time on demand.

Lazy loading speeds up the application initial load time by splitting the code into multiple bundles and loading them on demand.

1.         Each and every Angular2 application must have one main module that is called “AppModule” and your code should be splitted into various child modules based on your applications.
2.         We do not require to import or declare lazily loading module in root module.
3.         Add the route to top level routing and takes routes array and configures the router.
4.         Import module specific routing in the child module.
5.         And so on.



 I hope you are enjoying with this post! Please share with you friends. Thank you!!
ANIL SINGH

Anil Singh is an author, tech blogger, and software programmer. Book writing, tech blogging is something do extra and Anil love doing it. For more detail, kindly refer to this link..

My Tech Blog - https://www.code-sample.com/
My Books - Book 1 and Book 2

Angular 2 - What is Lazy Loading and How to enable Lazy Loading? Angular 2 - What is Lazy Loading and How to enable Lazy Loading? Reviewed by Anil Singh on 11:30 PM Rating: (5)
www.code-sample.com/. Powered by Blogger.
^