FarmMapsLib/src/app/app-routing.module.ts

45 lines
1.1 KiB
TypeScript
Raw Normal View History

2019-07-16 14:15:40 +00:00
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
2019-11-01 14:57:50 +00:00
import { AuthGuard,FullScreenGuard } from '@farmmaps/common';
2019-11-05 07:59:36 +00:00
import { MapComponent } from '@farmmaps/common-map';
2019-11-05 16:19:33 +00:00
import { LogoComponent } from './logo/logo.component';
import { MenuComponent } from './menu/menu.component';
2019-07-16 14:15:40 +00:00
const routes = [
2019-11-01 14:57:50 +00:00
{
path: '',
redirectTo: 'map',
pathMatch: 'full'
},
{ path: 'map', canActivateChild: [AuthGuard],canActivate:[FullScreenGuard], children: [
{
path: '',
component: MapComponent
},
{
path: ':xCenter/:yCenter/:zoom/:rotation/:baseLayer/:queryState',
2019-11-05 16:19:33 +00:00
component: MapComponent,
children:[
{
path: '',
component: LogoComponent,
outlet: 'side-panel-logo'
},
{
path: '',
component: MenuComponent,
outlet: 'side-panel-menu'
}
]
2019-11-01 14:57:50 +00:00
}
]},
2019-07-16 14:15:40 +00:00
];
@NgModule({
imports: [RouterModule.forRoot(routes,
{ initialNavigation: false })], // , enableTracing: true
exports: [RouterModule]
})
export class AppRoutingModule { }