Download src/app/app-routing.module.ts from pykara/py-learn: direct link, hf CLI and curl.
- Browser
- Download file 1.56 kB
-
https://huggingface.co/spaces/pykara/py-learn/resolve/main/src/app/app-routing.module.ts
- Command line
-
hf download hf://spaces/pykara/py-learn/src/app/app-routing.module.ts
-
curl -L -o app-routing.module.ts https://huggingface.co/spaces/pykara/py-learn/resolve/main/src/app/app-routing.module.ts
1.56 kB
| 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'; | |
| /** | |
| * Application routing configuration | |
| * | |
| * Routes are organized by access level: | |
| * - Public routes (no authentication required) | |
| * - Protected routes (authentication required) | |
| */ | |
| export const routes: Routes = [ | |
| // Public routes | |
| { | |
| path: '', | |
| component: HomeComponent, | |
| pathMatch: 'full', | |
| data: { title: 'Home' } | |
| }, | |
| { | |
| path: 'home', | |
| component: HomeComponent, | |
| data: { title: 'Home' } | |
| }, | |
| { | |
| path: 'login', | |
| component: SignInComponent, | |
| data: { title: 'Sign In' } | |
| }, | |
| // Chat routes | |
| { | |
| path: 'chat', | |
| component: ChatComponent, | |
| data: { title: 'Chat' } | |
| }, | |
| { | |
| path: 'chat/:id', | |
| component: ChatComponent, | |
| data: { title: 'Chat' } | |
| }, | |
| { | |
| path: 'mj-chat', | |
| component: StaticChatComponent, | |
| data: { title: 'MJ-CHAT' } | |
| }, | |
| // Fallback route | |
| { | |
| path: '**', | |
| redirectTo: '', | |
| data: { title: 'Page Not Found' } | |
| } | |
| ]; | |
| ({ | |
| imports: [RouterModule.forRoot(routes, { | |
| enableTracing: false, // Set to true for debugging | |
| scrollPositionRestoration: 'top', | |
| anchorScrolling: 'enabled' | |
| })], | |
| exports: [RouterModule] | |
| }) | |
| export class AppRoutingModule { } | |