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-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 { }
|