2019-07-16 14:15:40 +00:00
|
|
|
import { NgModule } from '@angular/core';
|
2021-06-16 07:15:53 +00:00
|
|
|
import { RouterModule, UrlSegment, ExtraOptions } from '@angular/router';
|
2019-07-16 14:15:40 +00:00
|
|
|
|
2020-11-02 11:24:15 +00:00
|
|
|
import { AuthGuard, FullScreenGuard } from '@farmmaps/common';
|
|
|
|
//import { MapComponent } from '@farmmaps/common-map';
|
|
|
|
//import { Switch2D3DComponent } from '@farmmaps/common-map3d';
|
2019-11-05 16:19:33 +00:00
|
|
|
import { LogoComponent } from './logo/logo.component';
|
|
|
|
import { MenuComponent } from './menu/menu.component';
|
2020-11-02 11:24:15 +00:00
|
|
|
import { RegisterDeviceComponent } from './registerdevice/registerdevice.component';
|
|
|
|
import { NotImplementedComponent } from '@farmmaps/common';
|
2020-01-08 10:37:57 +00:00
|
|
|
import { NavBarGuard } from 'projects/common/src/public-api';
|
2020-11-02 11:24:15 +00:00
|
|
|
import { TestComponent } from './test/test.component';
|
|
|
|
import { LandingpageComponent } from './landingpage/landingpage.component';
|
2019-07-16 14:15:40 +00:00
|
|
|
|
2020-01-07 21:31:27 +00:00
|
|
|
export function urlMatcher(url: UrlSegment[]) {
|
2020-11-02 11:24:15 +00:00
|
|
|
return { consumed: url };
|
2020-01-07 21:31:27 +00:00
|
|
|
}
|
|
|
|
|
2019-07-16 14:15:40 +00:00
|
|
|
const routes = [
|
2020-11-02 11:24:15 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
path: '',
|
|
|
|
canActivate: [NavBarGuard],
|
|
|
|
component: LandingpageComponent
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '',
|
|
|
|
component: LogoComponent,
|
|
|
|
outlet: 'header-logo'
|
|
|
|
},
|
2021-01-27 09:33:01 +00:00
|
|
|
{
|
|
|
|
path: '',
|
|
|
|
component: TestComponent,
|
|
|
|
outlet: 'app-menu'
|
|
|
|
},
|
2021-02-11 10:49:28 +00:00
|
|
|
{
|
|
|
|
path: '',
|
|
|
|
component: TestComponent,
|
|
|
|
outlet: 'notification-menu'
|
|
|
|
},
|
2021-02-16 16:23:15 +00:00
|
|
|
{
|
|
|
|
path: '',
|
|
|
|
component: TestComponent,
|
|
|
|
outlet: 'help-menu'
|
|
|
|
},
|
2020-01-07 21:31:27 +00:00
|
|
|
{
|
|
|
|
path: '',
|
|
|
|
component: LogoComponent,
|
|
|
|
outlet: 'side-panel-logo'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '',
|
|
|
|
component: MenuComponent,
|
|
|
|
outlet: 'side-panel-menu'
|
|
|
|
},
|
2019-11-01 14:57:50 +00:00
|
|
|
{
|
2020-11-02 11:24:15 +00:00
|
|
|
path: 'editor/:type/item/:itemcode',
|
|
|
|
canActivate: [NavBarGuard],
|
2019-11-08 12:48:43 +00:00
|
|
|
component: NotImplementedComponent
|
|
|
|
},
|
|
|
|
{
|
2020-11-02 11:24:15 +00:00
|
|
|
path: 'viewer/:type/item/:itemcode',
|
|
|
|
canActivate: [NavBarGuard],
|
2019-11-08 12:48:43 +00:00
|
|
|
component: NotImplementedComponent
|
|
|
|
},
|
2023-01-24 15:28:38 +00:00
|
|
|
{ path: 'map', loadChildren: () => import('../../projects/common-map/src/public-api').then(m => m.AppCommonMapModule), canActivateChild: [AuthGuard],canActivate: [FullScreenGuard], },
|
2020-11-02 11:24:15 +00:00
|
|
|
{ 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
|
|
|
|
}
|
2019-07-16 14:15:40 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
imports: [RouterModule.forRoot(routes,
|
2021-06-16 07:15:53 +00:00
|
|
|
{ initialNavigation: 'enabledBlocking' })], // , enableTracing: true
|
2019-07-16 14:15:40 +00:00
|
|
|
exports: [RouterModule]
|
|
|
|
})
|
|
|
|
export class AppRoutingModule { }
|