Advertisement
Guest User

route

a guest
Apr 24th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. const routes: Routes = [
  2. { path: '', pathMatch: 'full', component: HomeComponent },
  3. { path: 'home', component: HomeComponent },
  4. { path: 'signup', component: SignupComponent },
  5. { path: 'login', component: LoginComponent },
  6. { path: 'posts', component: PostAllComponent, canActivate: [ AuthGuard ] },
  7. { path: 'posts/edit/:id', component: PostEditComponent, canActivate: [ AuthGuard ], resolve: { post: SinglePostResolver } },
  8. { path: 'posts/details/:id', component: PostDetailsComponent, canActivate: [ AuthGuard ], resolve: { post: SinglePostResolver} },
  9. { path: 'posts/create', component: PostCreateComponent, canActivate: [ AuthGuard ] },
  10. { path: '**', component: NotFoundComponent }
  11. ];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement