added create page and updated auth
This commit is contained in:
@ -4,10 +4,17 @@ import { PostComponent } from './routes/post/post.component';
|
||||
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';
|
||||
|
||||
export const routes: Routes = [
|
||||
{ path: '', component: HomeComponent },
|
||||
{ path: 'post', children: [{ path: ':id', component: PostComponent }] },
|
||||
{
|
||||
path: 'post',
|
||||
children: [
|
||||
{ path: 'new', component: CreatePostComponent },
|
||||
{ path: ':id', component: PostComponent },
|
||||
],
|
||||
},
|
||||
{ path: 'admin', component: AdminComponent, canActivate: [LoggedInGuard] },
|
||||
{ path: 'tst', component: PostEditorComponent },
|
||||
];
|
||||
|
Reference in New Issue
Block a user