From bcd88af53b1a920d728ec98b45daa9ac2e2c0917 Mon Sep 17 00:00:00 2001 From: transtrike Date: Fri, 12 Feb 2021 19:04:53 +0200 Subject: Moved from DevHive --- src/app/app-routing.module.ts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/app/app-routing.module.ts (limited to 'src/app/app-routing.module.ts') diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts new file mode 100644 index 0000000..0d83079 --- /dev/null +++ b/src/app/app-routing.module.ts @@ -0,0 +1,30 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; +import { FeedComponent } from './components/feed/feed.component'; +import { LoginComponent } from './components/login/login.component'; +import { RegisterComponent } from './components/register/register.component'; +import { ProfileComponent } from './components/profile/profile.component'; +import { ProfileSettingsComponent } from './components/profile-settings/profile-settings.component'; +import { NotFoundComponent } from './components/not-found/not-found.component'; +import { PostPageComponent } from './components/post-page/post-page.component'; +import {AdminPanelPageComponent} from './components/admin-panel-page/admin-panel-page.component'; +import {CommentPageComponent} from './components/comment-page/comment-page.component'; + +const routes: Routes = [ + { path: '', component: FeedComponent }, + { path: 'login', component: LoginComponent }, + { path: 'register', component: RegisterComponent }, + { path: 'profile/:username', component: ProfileComponent }, + { path: 'profile/:username/settings', component: ProfileSettingsComponent }, + { path: 'post/:id', component: PostPageComponent }, + { path: 'comment/:id', component: CommentPageComponent }, + { path: 'admin-panel', component: AdminPanelPageComponent }, + { path: 'not-found', component: NotFoundComponent }, + { path: '**', component: NotFoundComponent } +]; + +@NgModule({ + imports: [RouterModule.forRoot(routes)], + exports: [RouterModule] +}) +export class AppRoutingModule { } -- cgit v1.2.3