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

85 lines
2.3 KiB
TypeScript
Raw Normal View History

2019-07-16 14:15:40 +00:00
import { NgModule } from '@angular/core';
import { RouterModule, UrlSegment, ExtraOptions } from '@angular/router';
2019-07-16 14:15:40 +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';
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';
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[]) {
return { consumed: url };
2020-01-07 21:31:27 +00:00
}
2019-07-16 14:15:40 +00:00
const routes = [
{
path: '',
canActivate: [NavBarGuard],
component: LandingpageComponent
},
{
path: '',
component: LogoComponent,
outlet: 'header-logo'
},
{
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
{
path: 'editor/:type/item/:itemcode',
canActivate: [NavBarGuard],
2019-11-08 12:48:43 +00:00
component: NotImplementedComponent
},
{
path: 'viewer/:type/item/:itemcode',
canActivate: [NavBarGuard],
2019-11-08 12:48:43 +00:00
component: NotImplementedComponent
},
2022-09-27 17:58:08 +00:00
{ path: 'map', loadChildren: () => import('../../projects/common-map/src/public-api').then(m => m.AppCommonMapModule), canActivateChild: [AuthGuard],canActivate: [NavBarGuard], },
{ 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,
{ initialNavigation: 'enabledBlocking' })], // , enableTracing: true
2019-07-16 14:15:40 +00:00
exports: [RouterModule]
})
export class AppRoutingModule { }