I\'m trying to show the navigation bar, once the user successfully do.
For example:
How To Change \"showMenu\" property in \"AppComponent\" inside the \"Logi
best modern way in angular4, with new router, with children routes, just needed use UrlSerializer-class to remove parenthesis, https://angular.io/docs/ts/latest/api/router/index/UrlSerializer-class.html, anyone did uses it?
export const ROUTES: Routes = [
{ path: 'login', component: LoginComponent },
{
path : '',
children: [
{
path: '', component: DefaultLayoutComponent,
children: [
{ path: '', component: HomeComponent, canActivate: [AuthGuard] },
{ path: 'users', component: UsersListComponent, canActivate: [AuthGuard] },
{ path: 'users-add', component: UsersAddComponent, canActivate: [AuthGuard] },
{ path: 'users-view/:id', component: UsersViewComponent, canActivate: [AuthGuard] },
{ path: 'users-edit/:id', component: UsersEditComponent, canActivate: [AuthGuard] },
]
}
]
},
// otherwise redirect to home
{ path: '**', redirectTo: '' }
]