Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions oar-lps/libs/oarlps/src/lib/datacart/datacart-routing.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { DatacartRoutes } from './datacart.routes';

const routes: Routes = [
...DatacartRoutes
];

@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule],
})
export class DatacartRoutingModule { }
4 changes: 3 additions & 1 deletion oar-lps/libs/oarlps/src/lib/datacart/datacart.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { TooltipModule } from 'primeng/tooltip';
import { BadgeModule } from 'primeng/badge';
import { TreetableComponent } from './treetable/treetable.component';
import { LeaveWhileDownloadingGuard } from './leave.guard';
import { DatacartRoutingModule } from './datacart-routing.module';

@NgModule({
declarations: [
Expand All @@ -30,7 +31,8 @@ import { LeaveWhileDownloadingGuard } from './leave.guard';
],
imports: [
CommonModule, SharedModule, ProgressSpinnerModule, NgbModule, TreeModule, FieldsetModule,
DialogModule, OverlayPanelModule, TreeTableModule, ButtonModule, TooltipModule, BadgeModule
DialogModule, OverlayPanelModule, TreeTableModule, ButtonModule, TooltipModule, BadgeModule,
DatacartRoutingModule
],
exports: [
DatacartComponent
Expand Down
13 changes: 1 addition & 12 deletions pdr-lps/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,7 @@ const routes: Routes = [

// Copied datacart routes here to test lazyloading
{ path: 'datacart',
// loadChildren: () => import('oarlps').then(m => m.DatacartModule),
children: [
{ path: ':cartname',
loadComponent: () => import('oarlps')
.then(mod => mod.DatacartComponent),
canDeactivate: [LeaveWhileDownloadingGuard]
},
{ path: 'ark:/:naan/:cartname',
loadComponent: () => import('oarlps')
.then(mod => mod.DatacartComponent),
canDeactivate: [LeaveWhileDownloadingGuard] }
]
loadChildren: () => import('oarlps').then(m => m.DatacartModule),
},
// app paths
{ path: 'about', component: LandingAboutComponent },
Expand Down