Commit 42e1fd5b authored by Jie Yuan's avatar Jie Yuan

add app routings

parent f5fb45a0
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
const routes: Routes = [];
import { LoginComponent } from './login/login.component';
import {TableComponent} from './dashboard/table/table.component';
import {DashboardGuard} from './dashboard/dashboard-guards.service';
import {AuthGuard} from './dashboard/auth-guard.service';
import { FulltableComponent } from './dashboard/fulltable/fulltable.component';
import {AailoginComponent} from './aailogin/aailogin.component';
import {SiteComponent} from './dashboard/site/site.component';
import {HostnameComponent} from './dashboard/hostname/hostname.component';
import {ServiceComponentComponent} from './dashboard/service-component/service-component.component';
import {ServiceComponentHistoryComponent} from './dashboard/service-component-history/service-component-history.component';
import { DataPolicyStatementComponent } from './data-policy-statement/data-policy-statement.component';
const Routes: Routes = [
{ path: '', redirectTo: 'dashboard', pathMatch: 'full'},
{ path: 'login', component: LoginComponent },
{ path: 'aailogin', component: AailoginComponent },
{ path: 'dps', component: DataPolicyStatementComponent },
{ path: 'dashboard', canActivate: [AuthGuard], component: TableComponent},
{ path: 'dashboard/site', canActivate: [AuthGuard], component: SiteComponent},
{ path: 'dashboard/hostNameComponent', canActivate: [AuthGuard], component: HostnameComponent},
{ path: 'dashboard/servComponent', canActivate: [AuthGuard],component: ServiceComponentComponent},
{ path: 'dashboard/servCompHisComponent', canActivate: [AuthGuard], component: ServiceComponentHistoryComponent},
{ path: 'dashboard/fullTableComponent', canActivate: [AuthGuard], component: FulltableComponent},
{ path: '**', redirectTo: 'login'}
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
imports: [
RouterModule.forRoot(
Routes,
{ enableTracing: false } // <-- debugging purposes only
)
],
exports: [
RouterModule
]
})
export class AppRoutingModule { }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment