Last active
May 28, 2018 14:20
-
-
Save nhh/8ffa469ed062c187f70c22c3ac25b306 to your computer and use it in GitHub Desktop.
AppRoutes.ts
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 { Routes, RouterModule } from "@angular/router"; | |
import { NgModule } from '@angular/core'; | |
import { AdminComponent } from './component/admin/admin.component'; | |
import { IsAuthenticatedGuard } from '../shared/guard/is-authenticated.guard'; | |
const routes: Routes = [ | |
{ | |
path: 'admin', | |
canActivate: [IsAuthenticatedGuard], | |
component: AdminComponent, | |
} | |
]; | |
@NgModule({ | |
imports: [ RouterModule.forRoot(routes) ], | |
exports: [ RouterModule ] | |
}) | |
export class AppRouting {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment