projects
/
demos
/
kafka
/
chat
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
feat: Added a chatroom component, that is navigatable by the chatroom's ID
[demos/kafka/chat]
/
src
/
app
/
app-routing.module.ts
diff --git
a/src/app/app-routing.module.ts
b/src/app/app-routing.module.ts
index
0297262
..
4809bdd
100644
(file)
--- 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 { 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)],
@NgModule({
imports: [RouterModule.forRoot(routes)],