I just noticed that Angular 8 (which will be released soon), has deprecated "string-typed router loadChildren
". (ticket)
Do I understand correctly that they are refering to ...
const routes = [
{
path: 'production',
loadChildren: './production/production.module#ProductionModule' // <<--this
}],
To migrate to Angular 8, what is the solution ?
In the ticket they are refering to "dynamic imports". Am I correct that this refers to the following proposal:
let module = await import('/modules/my-module.js');
Could somebody give a preview of what the routing file should actually look like if we wanted to use lazy loading in the future ?
As loadChildren:string is deprecated in angular 8 Change your loadChildren declarations
From
To
For more you can ref angular official git link and commit