feat: Added a chatroom component, that is navigatable by the chatroom's ID
[demos/kafka/chat] / src / app / app-routing.module.ts
index 0297262..4809bdd 100644 (file)
@@ -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)],