35 lines
878 B
TypeScript
35 lines
878 B
TypeScript
import { NgModule } from '@angular/core';
|
|
import { RouterModule, Routes } from '@angular/router';
|
|
|
|
import { TabComponent } from './tabs.component';
|
|
import { AuthGuard } from '../guards/auth.guard';
|
|
import { ProjectsComponent } from '../projects/projects.component';
|
|
import { DmpComponent } from '../dmps/dmp.component';
|
|
|
|
const tabsRoutes: Routes = [
|
|
{
|
|
path: 'tabs', component: TabComponent, canActivate: [AuthGuard],
|
|
children: [
|
|
{
|
|
path: 'projects',
|
|
component: ProjectsComponent
|
|
},
|
|
{
|
|
path: 'dmps',
|
|
component: DmpComponent
|
|
}
|
|
]
|
|
},
|
|
{ path: 'tabs/projects', component: ProjectsComponent }, // canActivate: [AuthGuard]
|
|
{ path: 'tabs/dmps', component: DmpComponent }
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [
|
|
RouterModule.forChild(tabsRoutes)
|
|
],
|
|
exports: [
|
|
RouterModule
|
|
]
|
|
})
|
|
export class TabRoutingModule { } |