Revize c335ea37
Přidáno uživatelem Hung Hoang před téměř 6 roky(ů)
webapp/src/app/app-routing.module.ts | ||
---|---|---|
7 | 7 |
import {DashboardComponentGuard} from './auth/dashboard-component.guard'; |
8 | 8 |
|
9 | 9 |
const routes: Routes = [ |
10 |
{ path: 'employees', component: EmployeesListComponent, canActivate: [EmployeeComponentGuard] },
|
|
11 |
{ path: 'dashboard', component: DashboardComponent, canActivate: [DashboardComponentGuard] },
|
|
10 |
{ path: 'employees', component: EmployeesListComponent, canActivate: [EmployeeComponentGuard], runGuardsAndResolvers: 'always'},
|
|
11 |
{ path: 'dashboard', component: DashboardComponent, canActivate: [DashboardComponentGuard], runGuardsAndResolvers: 'always'},
|
|
12 | 12 |
{ path: '', redirectTo: '/dashboard', pathMatch: 'full' }, |
13 | 13 |
{ path: '**', component: PageNotFoundComponent } |
14 | 14 |
]; |
15 | 15 |
|
16 | 16 |
@NgModule({ |
17 |
imports: [RouterModule.forRoot(routes)], |
|
17 |
imports: [RouterModule.forRoot(routes, {onSameUrlNavigation: 'reload'})],
|
|
18 | 18 |
exports: [RouterModule] |
19 | 19 |
}) |
20 | 20 |
export class AppRoutingModule { } |
Také k dispozici: Unified diff
Clicking on menu item refreshes logged user profile data in profile service