Hi guys,
I have searching for an answer how to do this but noting is working.
I am trying like this:
import { RouterConfig } from '@angular/router';
import { DashboardComponent } from './index';
import { AuthGuard } from '../auth.guard';
import { DashboardHomeComponent } from
'./DashboardHome/dashboardhome.component';
import { JobsComponent } from './Jobs/jobs.component';
import { ClientsComponent } from './Clients/clients.component';
export const DashboardRoutes: RouterConfig = [
{
path: '',
redirectTo: '/dashboard',
terminal:true
},
{
path: '/**',
redirectTo: '/dashboard',
terminal:true
},
{
path: '/dashboard',
component: DashboardComponent,
canActivate: [AuthGuard],
children:[
{path: '', component: DashboardHomeComponent, canActivate: [
AuthGuard]},
{path: 'jobs', component: JobsComponent, canActivate: [AuthGuard]},
{path: 'clients', component: ClientsComponent, canActivate: [
AuthGuard]},
]
},
];
but nothing is working of any routes that does not exists.
Any help will be much appreciated.
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.