blob: 215da1e4f1b9253d231c4509e10d3f2aa4a4cf20 (
plain) (
tree)
|
|
import { NgModule } from '@angular/core'
import { RouterModule, Routes } from '@angular/router'
import { ConfigRoutes } from '@app/+admin/config'
import { MetaGuard } from '@ngx-meta/core'
import { AdminComponent } from './admin.component'
import { FollowsRoutes } from './follows'
import { UsersRoutes } from './users'
import { ModerationRoutes } from '@app/+admin/moderation/moderation.routes'
import { SystemRoutes } from '@app/+admin/system'
const adminRoutes: Routes = [
{
path: '',
component: AdminComponent,
canActivate: [ MetaGuard ],
canActivateChild: [ MetaGuard ],
children: [
{
path: '',
redirectTo: 'users',
pathMatch: 'full'
},
...FollowsRoutes,
...UsersRoutes,
...ModerationRoutes,
...SystemRoutes,
...ConfigRoutes
]
}
]
@NgModule({
imports: [ RouterModule.forChild(adminRoutes) ],
exports: [ RouterModule ]
})
export class AdminRoutingModule {}
|