X-Git-Url: https://juplo.de/gitweb/?a=blobdiff_plain;f=src%2Fapp%2Fapp-routing.module.ts;h=4809bddf6340b17ce766d831a07ddcb30d26e967;hb=a172837fe042e8acb3030df2d84cd39615cf5a11;hp=02972627f8df364102ce4ede71c8bd5f3660e1d8;hpb=4ad7b00938c3219f42a1017553a36d5f516b45cb;p=demos%2Fkafka%2Fchat diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 02972627..4809bddf 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,7 +1,15 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; +import { UserComponent } from "./user/user.component"; +import { ChatroomsComponent } from "./chatrooms/chatrooms.component"; +import { ChatroomComponent } from "./chatroom/chatroom.component"; -const routes: Routes = []; +const routes: Routes = [ + { path: 'user', component: UserComponent }, + { path: 'chatrooms', component: ChatroomsComponent }, + { path: 'chatroom/:id', component: ChatroomComponent }, + { path: '', redirectTo: '/user', pathMatch: 'full' }, +]; @NgModule({ imports: [RouterModule.forRoot(routes)],