mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-06 06:12:16 +00:00
42 lines
993 B
TypeScript
42 lines
993 B
TypeScript
import { NgModule } from '@angular/core';
|
|
import { RouterModule, Routes } from '@angular/router';
|
|
import { RoleGuard } from 'src/app/guards/role.guard';
|
|
|
|
import { ProjectsComponent } from './projects.component';
|
|
|
|
const routes: Routes = [
|
|
{
|
|
path: '',
|
|
component: ProjectsComponent,
|
|
data: { animation: 'HomePage' },
|
|
},
|
|
{
|
|
path: 'create',
|
|
loadChildren: () => import('./project-create/project-create.module'),
|
|
canActivate: [RoleGuard],
|
|
data: {
|
|
animation: 'AddPage',
|
|
roles: ['project.create'],
|
|
},
|
|
},
|
|
{
|
|
path: 'app-create',
|
|
canActivate: [RoleGuard],
|
|
data: {
|
|
animation: 'AddPage',
|
|
roles: ['project.app.write'],
|
|
},
|
|
loadChildren: () => import('../app-create/app-create.module'),
|
|
},
|
|
{
|
|
path: ':projectid',
|
|
loadChildren: () => import('./owned-projects/owned-projects.module'),
|
|
},
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [RouterModule.forChild(routes)],
|
|
exports: [RouterModule],
|
|
})
|
|
export class ProjectsRoutingModule {}
|