import { NgModule } from '@angular/core'; import { RouterModule ,UrlSegment} from '@angular/router'; import { AuthGuard,FullScreenGuard } from '@farmmaps/common'; import { MapComponent } from '@farmmaps/common-map'; import { LogoComponent } from './logo/logo.component'; import { MenuComponent } from './menu/menu.component'; import {NotImplementedComponent} from '@farmmaps/common'; export function urlMatcher(url: UrlSegment[]) { return {consumed:url}; } const routes = [ { path: '', component: LogoComponent, outlet: 'side-panel-logo' }, { path: '', component: MenuComponent, outlet: 'side-panel-menu' }, { path: '', redirectTo: 'map', pathMatch: 'full' }, { path:'editor/:type/item/:itemcode', component: NotImplementedComponent }, { path:'viewer/:type/item/:itemcode', component: NotImplementedComponent }, { path: 'map', canActivateChild: [AuthGuard],canActivate:[FullScreenGuard], children: [ { path: '', component: MapComponent }, { path: ':xCenter/:yCenter/:zoom/:rotation/:baseLayer/:queryState', component: MapComponent } ]} ]; @NgModule({ imports: [RouterModule.forRoot(routes, { initialNavigation: false })], // , enableTracing: true exports: [RouterModule] }) export class AppRoutingModule { }