I have form in child components and i put child component under parent-component form. I have implemented canDeactivate which is not working for child component.
export const routes: Routes = [
{path: '', component: AppComponent,children:[
{path:'user/new',component:UserFormComponent,canDeactivate: [CanDeactivateGuard]},
{path:'',component:UserListComponent}
]},
];
The following stackblitz example. Stackblitz exmaple for candeactivate
Can anyone help me, where i am doing wrong