Add landingpage and lazyloading voor 3d map
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
@@ -1,21 +1,33 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule ,UrlSegment} from '@angular/router';
|
||||
import { RouterModule, UrlSegment } from '@angular/router';
|
||||
|
||||
import { AuthGuard,FullScreenGuard } from '@farmmaps/common';
|
||||
import { MapComponent } from '@farmmaps/common-map';
|
||||
import { Switch2D3DComponent } from '@farmmaps/common-map3d';
|
||||
import { AuthGuard, FullScreenGuard } from '@farmmaps/common';
|
||||
//import { MapComponent } from '@farmmaps/common-map';
|
||||
//import { Switch2D3DComponent } from '@farmmaps/common-map3d';
|
||||
import { LogoComponent } from './logo/logo.component';
|
||||
import { MenuComponent } from './menu/menu.component';
|
||||
import {RegisterDeviceComponent} from './registerdevice/registerdevice.component';
|
||||
import {NotImplementedComponent} from '@farmmaps/common';
|
||||
import { RegisterDeviceComponent } from './registerdevice/registerdevice.component';
|
||||
import { NotImplementedComponent } from '@farmmaps/common';
|
||||
import { NavBarGuard } from 'projects/common/src/public-api';
|
||||
import {TestComponent} from './test/test.component';
|
||||
import { TestComponent } from './test/test.component';
|
||||
import { LandingpageComponent } from './landingpage/landingpage.component';
|
||||
|
||||
export function urlMatcher(url: UrlSegment[]) {
|
||||
return {consumed:url};
|
||||
return { consumed: url };
|
||||
}
|
||||
|
||||
const routes = [
|
||||
|
||||
{
|
||||
path: '',
|
||||
canActivate: [NavBarGuard],
|
||||
component: LandingpageComponent
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
component: LogoComponent,
|
||||
outlet: 'header-logo'
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
component: LogoComponent,
|
||||
@@ -27,50 +39,26 @@ const routes = [
|
||||
outlet: 'side-panel-menu'
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
redirectTo: 'map',
|
||||
pathMatch: 'full'
|
||||
},
|
||||
{
|
||||
path:'editor/:type/item/:itemcode',
|
||||
canActivate:[NavBarGuard],
|
||||
path: 'editor/:type/item/:itemcode',
|
||||
canActivate: [NavBarGuard],
|
||||
component: NotImplementedComponent
|
||||
},
|
||||
{
|
||||
path:'viewer/:type/item/:itemcode',
|
||||
canActivate:[NavBarGuard],
|
||||
path: 'viewer/:type/item/:itemcode',
|
||||
canActivate: [NavBarGuard],
|
||||
component: NotImplementedComponent
|
||||
},
|
||||
{ path: 'map', canActivateChild: [AuthGuard],canActivate:[FullScreenGuard], children: [
|
||||
{
|
||||
path: '',
|
||||
component: MapComponent
|
||||
},
|
||||
{
|
||||
path: ':xCenter/:yCenter/:zoom/:rotation/:baseLayer/:queryState',
|
||||
component: MapComponent ,
|
||||
children: [
|
||||
{
|
||||
path:'',
|
||||
component: Switch2D3DComponent,
|
||||
outlet: 'map-controls'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: ':queryState',
|
||||
component: MapComponent
|
||||
}
|
||||
]},
|
||||
{
|
||||
path:'registerdevice/:deviceToken',
|
||||
canActivate:[FullScreenGuard],
|
||||
component:RegisterDeviceComponent
|
||||
},
|
||||
{
|
||||
path:'test',
|
||||
component: TestComponent
|
||||
}
|
||||
{ path: 'map', loadChildren: () => import('../../projects/common-map/src/public-api').then(m => m.AppCommonMapModule), canActivateChild: [AuthGuard], canActivate: [FullScreenGuard] },
|
||||
{ path: 'map3d', loadChildren: () => import('./map3d/map3d.module').then(m => m.Map3DModule), canActivateChild: [AuthGuard], canActivate: [FullScreenGuard] },
|
||||
{
|
||||
path: 'registerdevice/:deviceToken',
|
||||
canActivate: [FullScreenGuard],
|
||||
component: RegisterDeviceComponent
|
||||
},
|
||||
{
|
||||
path: 'test',
|
||||
component: TestComponent
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
Reference in New Issue
Block a user