added create page and updated auth

This commit is contained in:
u80864958
2025-04-28 11:32:26 +02:00
parent efe902639e
commit 4429f2670c
16 changed files with 242 additions and 30 deletions

View File

@ -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 },
];