How to load angular components by router state change?
In Angular all components are packed in one file and loading all at once so main.bundle.js gets bigger with any new component so we can load needed components async, when the router state changes. Example of this is given below: import { ModuleWithProviders } from '@angular/core'; import { Routes, RouterModule } from…
Answered Jan 15, 2020 · 1.3K Views Read answer →