Last active
October 9, 2018 08:13
-
-
Save considine/bdfd4ba32e154acca459e22b9183a609 to your computer and use it in GitHub Desktop.
This file contains 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 { Routes, RouterModule } from "@angular/router"; | |
const routes: Routes = [ | |
{ | |
path: "", | |
redirectTo: "home", | |
pathMatch: "full" | |
}, | |
{ | |
path: "home", | |
loadChildren: "./home/home.module#HomePageModule" | |
}, | |
{ | |
path: "home/:category", | |
loadChildren: "./home/home.module#HomePageModule" | |
}, | |
{ | |
path: "posts/:id", | |
loadChildren: "./post-detail/post-detail.module#PostDetailPageModule" | |
}, | |
{ | |
path: "categories", | |
loadChildren: "./categories/categories.module#CategoriesPageModule" | |
} | |
]; | |
@NgModule({ | |
imports: [RouterModule.forRoot(routes)], | |
exports: [RouterModule] | |
}) | |
export class AppRoutingModule {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment