feat(project-editor): warn before leaving with unsaved changes
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { Routes } from '@angular/router';
|
||||
import { languageGuard } from './guards/language.guard';
|
||||
import { projectEditorDirtyGuard } from './features/project-editor/guards/project-editor-dirty.guard';
|
||||
import { environment } from '../environments/environment';
|
||||
|
||||
// Core routes (same across all brands)
|
||||
@@ -41,7 +42,8 @@ const coreRoutes: Routes = [
|
||||
},
|
||||
{
|
||||
path: 'edit/:section',
|
||||
loadComponent: () => import('./features/project-editor/pages/project-editor-page.component').then(m => m.ProjectEditorPageComponent)
|
||||
loadComponent: () => import('./features/project-editor/pages/project-editor-page.component').then(m => m.ProjectEditorPageComponent),
|
||||
canDeactivate: [projectEditorDirtyGuard]
|
||||
},
|
||||
{
|
||||
path: 'edit',
|
||||
|
||||
Reference in New Issue
Block a user