Answer the question
In order to leave comments, you need to log in
Angular2. How to do "lazy loading"?
When writing a mini-application from the official Angular2 tutorial, I noticed that when the page is updated, Angular loads everything at once: all components, services, templates, styles, etc., even those that are not used right now (there is routing). Therefore, the question arose: how to make the so-called "lazy loading" so that what is used here and now is loaded, and, say, when switching to another route, the necessary components, styles, etc. are loaded in it?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question