Advertisement
fabiobiondi

Angular Module Problem

Nov 7th, 2020
2,843
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // app.module.ts
  2. @NgModule({
  3.   declarations: [
  4.     AppComponent
  5.   ],
  6.   imports: [
  7.     BrowserModule,
  8.     AppRoutingModule,
  9.     ContactsModule,
  10.     UtilsModule.forRoot()
  11.   ],
  12.   providers: [],
  13.   bootstrap: [AppComponent]
  14. })
  15. export class AppModule { }
  16.  
  17. // ===============================
  18. // app-routing.module.ts
  19.  
  20. const routes: Routes = [
  21.   { path: 'home', loadChildren: () => import('./features/home/home.module').then(m => m.HomeModule) },
  22.   { path: 'catalog', loadChildren: () => import('./features/catalog/catalog.module').then(m => m.CatalogModule) },
  23.   // IL PROBLEMA È QUI! Non carica questa pagina
  24.   { path: 'welcome', loadChildren: () => import('./features/welcome/welcome.module').then(m => m.WelcomeModule) },
  25.   /*{ path: 'contacts', loadChildren: () => import('./features/contacts/contacts.module').then(m => m.ContactsModule) }*/
  26. ];
  27.  
  28. @NgModule({
  29.   imports: [RouterModule.forRoot(routes)],
  30.   exports: [RouterModule]
  31. })
  32. export class AppRoutingModule { }
  33.  
  34. // =====
  35.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement