| import { NgModule } from '@angular/core'; |
| import { RouterModule, Routes } from '@angular/router'; |
| import { ChatComponent } from './chat/chat.component'; |
| import { HomeComponent } from './home/home.component'; |
| import { SignInComponent } from './sign-in/sign-in.component'; |
| import { authGuard } from './core/guards/auth.guard'; |
| import { StaticChatComponent } from './staticchat/staticchat.component'; |
|
|
| |
| |
| |
| |
| |
| |
| |
| export const routes: Routes = [ |
| |
| { |
| path: '', |
| component: HomeComponent, |
| pathMatch: 'full', |
| data: { title: 'Home' } |
| }, |
| { |
| path: 'home', |
| component: HomeComponent, |
| data: { title: 'Home' } |
| }, |
| { |
| path: 'login', |
| component: SignInComponent, |
| data: { title: 'Sign In' } |
| }, |
|
|
| |
| |
| { |
| path: 'chat', |
| component: ChatComponent, |
| data: { title: 'Chat' } |
| }, |
| { |
| path: 'chat/:id', |
| component: ChatComponent, |
| data: { title: 'Chat' } |
|
|
| }, |
| { |
| path: 'mj-chat', |
| component: StaticChatComponent, |
| data: { title: 'MJ-CHAT' } |
|
|
| }, |
|
|
| |
| { |
| path: '**', |
| redirectTo: '', |
| data: { title: 'Page Not Found' } |
| } |
| ]; |
|
|
| @NgModule({ |
| imports: [RouterModule.forRoot(routes, { |
| enableTracing: false, |
| scrollPositionRestoration: 'top', |
| anchorScrolling: 'enabled' |
| })], |
| exports: [RouterModule] |
| }) |
| export class AppRoutingModule { } |
|
|