28 lines
767 B
TypeScript
28 lines
767 B
TypeScript
|
import {NgModule} from '@angular/core';
|
||
|
import {CommonModule} from '@angular/common';
|
||
|
import {LoginComponent} from './auth/login/login.component';
|
||
|
import {RouterModule, Routes} from '@angular/router';
|
||
|
import {LogoutComponent} from './auth/logout/logout.component';
|
||
|
import {HomeComponent} from './home/home.component';
|
||
|
|
||
|
const appRoutes: Routes = [
|
||
|
{path: 'login', component: LoginComponent},
|
||
|
{path: 'logout', component: LogoutComponent},
|
||
|
{path: '', component: HomeComponent},
|
||
|
];
|
||
|
|
||
|
@NgModule({
|
||
|
imports: [
|
||
|
CommonModule,
|
||
|
RouterModule.forRoot(
|
||
|
appRoutes,
|
||
|
// {enableTracing: true} // <-- debugging purposes only
|
||
|
{} // <-- debugging purposes only
|
||
|
)
|
||
|
],
|
||
|
exports: [RouterModule],
|
||
|
declarations: []
|
||
|
})
|
||
|
export class AppRoutingModule {
|
||
|
}
|