How to remove the promise from loadChildren in Angular 15 importing a module

43 Views Asked by At

I am upgrading my application from Angular 14 to Angular 15 and I faced some problems when trying to remove the promise in my loadChildren call.

{
    path: 'julio-app',
    loadChildren: () =>
        import('./modules/julioApp/julioApp.module').then(
            (m) => m.JulioAppModule
        ),
},

After removing it the promise call like this:

{
    path: 'julio-app',
    loadChildren: () => import('./modules/julioApp/julioApp.module'),
},

I received the following error:

"Cannot find module './modules/julioApp/julioApp.module' or its corresponding type declarations."

Do you guys have faced this error before while upgrading to Angular 15? Thanks in advance!

0

There are 0 best solutions below