diff options
author | 2020-09-13 14:16:23 +0200 | |
---|---|---|
committer | 2020-09-13 14:16:23 +0200 | |
commit | 3ccdf7e6e266578b98063e898b4acca0f1d15eda (patch) | |
tree | 0e0d562eea0b7d96990ca6e1c9b704dcd670a901 /cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.routing.module.ts | |
parent | 8de37f9d3035b4a41e696b967f2222806c250925 (diff) |
keeping package changes safe
give user chance to discard changes or save changes
Issue-ID: CCSDK-2336
Signed-off-by: ShaabanEltanany <shaaban.eltanany.ext@orange.com>
Change-Id: If1e1c94ef65822428f25cca071103c9022add144
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.routing.module.ts')
-rw-r--r-- | cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.routing.module.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.routing.module.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.routing.module.ts index f357bc167..d9671d04c 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.routing.module.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.routing.module.ts @@ -1,10 +1,11 @@ import {NgModule} from '@angular/core'; -import {Routes, RouterModule} from '@angular/router'; +import {RouterModule, Routes} from '@angular/router'; import {PackagesDashboardComponent} from './packages-dashboard/packages-dashboard.component'; import {DesignerComponent} from './designer/designer.component'; import {PackageCreationComponent} from './package-creation/package-creation.component'; import {ConfigurationDashboardComponent} from './configuration-dashboard/configuration-dashboard.component'; -import { DesignerSourceViewComponent } from './designer/source-view/source-view.component'; +import {DesignerSourceViewComponent} from './designer/source-view/source-view.component'; +import {ComponentCanDeactivateGuard} from '../../../common/core/canDactivate/ComponentCanDeactivateGuard'; const routes: Routes = [ @@ -14,8 +15,8 @@ const routes: Routes = [ }, {path: 'designer/:id', component: DesignerComponent}, {path: 'designer/source/:id', component: DesignerSourceViewComponent}, - {path: 'package/:id', component: ConfigurationDashboardComponent}, - {path: 'createPackage', component: PackageCreationComponent} + {path: 'package/:id', component: ConfigurationDashboardComponent, canDeactivate: [ComponentCanDeactivateGuard]}, + {path: 'createPackage', component: PackageCreationComponent, canDeactivate: [ComponentCanDeactivateGuard]} ]; @NgModule({ |