Created
February 13, 2022 10:55
-
-
Save Alvaro237/f96e89e9ca0bdad7a11f6fed7873e188 to your computer and use it in GitHub Desktop.
Revisions
-
Alvaro237 created this gist
Feb 13, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ Split app modules in features modules and core module, don't import in app.module.ts feature modules, they have to be imported dynamiclly This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; const appRoutes: Routes = [ { path: '', redirectTo: '/recipes', pathMatch: 'full' }, { path: 'recipes', loadChildren: () => import('./recipes/recipes.module').then(m => m.RecipesModule) }, { path: 'shopping-list', loadChildren: () => import('./shopping-list/shopping-list.module').then( m => m.ShoppingListModule ) }, { path: 'auth', loadChildren: () => import('./auth/auth.module').then(m => m.AuthModule) } ]; @NgModule({ imports: [RouterModule.forRoot(appRoutes)], exports: [RouterModule] }) export class AppRoutingModule {}