I have an Component that display a list of projects, with Edit and Delete buttons
If i click delete:
onDelete(projectName: string): void {
this.projectService.deleteProject(projectName);
this.router.navigate(['/projects']);
}
My router component:
export const projectListRouters: Routes = [
{
path: '',
children: [
{path: '', component: URLComponent},
{path: 'login', component: Login},
{path: 'projects', canActivate: [AuthGuard], component: ProjectListComponent},
{path: 'project/new/-', component: ProjectDetails, canActivate: [AuthGuard], data: {oparationType: 'new'}},
// otherwise redirect to home
{path: '**', redirectTo: ''}
],
},
];
My problem is that the this.router.navigate(['/projects']) does not refresh the list after deleting the project,