import { NgModule } from '@angular/core' ; import { Routes , RouterModule } from '@angular/router' ; import { PermissionsEnum } from '@gauzy/contracts' ; import { NgxPermissionsGuard } from 'ngx-permissions' ; import { IncomeComponent } from './income.component' ; export function redirectTo ( ) { return '/pages/dashboard' ; } const routes = [ { path : '' , component : IncomeComponent , canActivate : [ NgxPermissionsGuard ] , data : { permissions : { only : [ PermissionsEnum . ORG_INCOMES_VIEW ] , redirectTo } } } ] ; @ NgModule ( { imports : [ RouterModule . forChild ( routes ) ] , exports : [ RouterModule ] } ) export class IncomeRoutingModule { }