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

31 lines
753 B
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';
import { MapComponent} from '@farmmaps/common-map';
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',
component: MapComponent
}
]},
2019-07-16 14:15:40 +00:00
];
@NgModule({
imports: [RouterModule.forRoot(routes,
{ initialNavigation: false })], // , enableTracing: true
exports: [RouterModule]
})
export class AppRoutingModule { }