noclist
noclist

Reputation: 1819

Update to > Angular 7 - string-typed router loadChildren still working

I have recently updated an application from Angular version 7 to 8. I was under the impression that my string typed loadChildren in my app-routing-module would be deprecated and I would need to convert to functions.

For example, this conversion:

path: 'admin-users',
loadChildren: './modules/user/user.module#UserModule',


path: 'admin-users',
loadChildren: () => import('./modules/user/user.module').then(m => m.UserModule)

However my routes as they exist seem to be behaving properly. Am I wrong in thinking they needed updated?

Upvotes: 0

Views: 64

Answers (1)

Naren Murali
Naren Murali

Reputation: 58209

In the upgrade site, it says its removed in V9, so I guess that's why it works

enter image description here

enter image description here

Upvotes: 1

Related Questions