import { NgModule } from '@angular/core' ; import { Routes , RouterModule } from '@angular/router' ; import { PermissionGuard } from '../auth/guards/permission.guard' ; import { SearchComponent } from './search.component' ; const routes = [ { path : '' , pathMatch : 'full' , canActivate : [ PermissionGuard ] , component : SearchComponent } ] ; @ NgModule ( { imports : [ RouterModule . forChild ( routes ) ] , exports : [ RouterModule ] } ) export class SearchRoutingModule { }