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 = [
{ path: 'user', component: UserComponent },
{ path: 'chatrooms', component: ChatroomsComponent },
+ { path: 'chatroom/:id', component: ChatroomComponent },
{ path: '', redirectTo: '/user', pathMatch: 'full' },
];