import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { StaffManagementComponent } from './staff-management/staff-management.component'; import { OrganizationListComponent } from './organization-list/organization-list.component'; import { StaffListComponent } from './staff-list/staff-list.component'; import { LoginHistoryListComponent } from './login-history-list/login-history-list.component'; import { OrganizationComponent } from './organization/organization.component'; import { OrganizationChartComponent } from './organization-chart/organization-chart.component'; import { OrganizationDetailComponent } from './organization-detail/organization-detail.component'; import { LoggedTimeComponent } from './logged-time/logged-time.component'; import { StaffActivityListComponent } from './staff-activity-list/staff-activity-list.component'; import { StaffEventCalendarComponent } from './staff-event-calendar/staff-event-calendar.component'; import { StaffReviewComponent } from './staff-review/staff-review.component'; import { StaffProfileComponent } from './staff-profile/staff-profile.component'; import { ErrorComponent } from './error/error/error.component'; import { StakeholderAccessDashboardComponent } from './stakeholder-access-dashboard/stakeholder-access-dashboard.component'; import { StakeholderOverviewFeatureComponent } from './stakeholder-overview-feature/stakeholder-overview-feature.component'; import { CommonDashboardComponent } from './dashboard/common-dashboard/common-dashboard.component'; const routes: Routes = [ { path: '', redirectTo:'Dashboard/Organisation',pathMatch:'full'}, { path: 'Dashboard', component: CommonDashboardComponent, children: [ { path: 'Organisation', component: OrganizationListComponent }, { path: 'Staff', component: StaffListComponent }, { path: 'History', component: LoginHistoryListComponent } ] }, { path: 'OrgProfile/:id', component: OrganizationComponent, children: [ { path: 'Profile/:id', component: OrganizationDetailComponent }, { path: 'Staff/:id', component: StaffListComponent },//route with company id { path: 'Loggedtime', component: LoggedTimeComponent}, { path: 'Activities/:id', component: StaffActivityListComponent},//route with company id { path: 'EventCalendar/:company', component: StaffEventCalendarComponent}, { path: 'StaffReview', component: StaffReviewComponent} ] }, { path: 'StaffProfile/:id', component: StaffProfileComponent, children: [] }, { path: 'StaffManagement', component: ErrorComponent}, { path: 'Contacts', component: ErrorComponent}, { path: 'Billing', component: ErrorComponent}, { path: 'WebsiteBuilder', component: ErrorComponent}, { path: 'e-Commerce', component: ErrorComponent}, { path: 'e-Marketing', component: ErrorComponent}, { path: 'Affliates', component: ErrorComponent}, { path: 'Forums', component: ErrorComponent}, { path: 'Flowchart', component: ErrorComponent}, { path: 'DataInfoCollection', component: ErrorComponent}, { path: 'CustomerService', component: ErrorComponent}, { path: 'On-screenTraining', component: ErrorComponent}, { path: 'ProjectManagement', component: ErrorComponent}, { path: 'Messaging', component: ErrorComponent}, { path: 'ExpertiseManagement', component: ErrorComponent}, { path: 'Automation', component: ErrorComponent}, { path: 'Analytics', component: ErrorComponent}, { path: 'Help', component: ErrorComponent}, { path: 'overview', component: StakeholderOverviewFeatureComponent} ]; @NgModule({ imports: [RouterModule.forRoot(routes,{ useHash: true })], exports: [RouterModule] }) export class AppRoutingModule { }