all files / app/feature-one/ feature-one.routes.ts

100% Statements 5/5
100% Branches 0/0
100% Functions 0/0
100% Lines 5/5
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22  1× 1×   1× 1×   1×                            
import { CanActivate, CanActivateChild, Routes } from '@angular/router';
import { FeatureOneComponent } from './feature-one.component';
import { LoggedInGuard, AccountSelectedGuard, RoleCheckGuard } from '@railinc/rl-ngx-core';
 
const GUARDS = [LoggedInGuard, AccountSelectedGuard];
const ROLES =  ['APPADMIN', 'RSIGHTMONUSR'];
 
export const FEATURE_ONE_ROUTES = [
    {
        path: '',
        component : FeatureOneComponent,
        canActivate : GUARDS
    },
    {
        path: '',
        canActivateChild : GUARDS,
        children: [
            { path: 'splc', canActivate : [RoleCheckGuard], loadChildren: './splc#SplcModule', data : { roles : ROLES } }
        ]
    },
];