Created
August 9, 2019 11:46
-
-
Save saimon24/1c4178a148defc7fcee01d560ccdb91a to your computer and use it in GitHub Desktop.
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 characters
import { NgModule } from '@angular/core'; | |
import { PreloadAllModules, RouterModule, Routes } from '@angular/router'; | |
const routes: Routes = [ | |
{ path: '', redirectTo: 'home', pathMatch: 'full' }, | |
{ path: 'home', loadChildren: './home/home.module#HomePageModule' }, | |
{ path: 'home/:index', loadChildren: './details/details.module#DetailsPageModule' }, | |
]; | |
@NgModule({ | |
imports: [ | |
RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules }) | |
], | |
exports: [RouterModule] | |
}) | |
export class AppRoutingModule { } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment