update and delete
This commit is contained in:
@ -5,6 +5,7 @@ import { AdminComponent } from './routes/admin/admin.component';
|
||||
import { LoggedInGuard } from './shared/guards/logged-in.guard';
|
||||
import { PostEditorComponent } from './components/post-editor/post-editor.component';
|
||||
import { CreatePostComponent } from './routes/post/create-post/create-post.component';
|
||||
import { UpdatePostComponent } from './routes/post/update-post/update-post.component';
|
||||
|
||||
export const routes: Routes = [
|
||||
{ path: '', component: HomeComponent },
|
||||
@ -12,7 +13,11 @@ export const routes: Routes = [
|
||||
path: 'post',
|
||||
children: [
|
||||
{ path: 'new', component: CreatePostComponent },
|
||||
{ path: ':id', component: PostComponent },
|
||||
{ path: ':id/edit', component: UpdatePostComponent },
|
||||
{
|
||||
path: ':id',
|
||||
component: PostComponent,
|
||||
},
|
||||
],
|
||||
},
|
||||
{ path: 'admin', component: AdminComponent, canActivate: [LoggedInGuard] },
|
||||
|
Reference in New Issue
Block a user