Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 75a753e

Browse files
extra routes/components removed from app-routing.module.ts
extra routes/components removed from app-routing.module.ts
1 parent 8d2483f commit 75a753e

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

‎README.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -70,32 +70,18 @@
7070
import { NgModule } from '@angular/core';
7171
import { Routes, RouterModule } from '@angular/router';
7272

73-
import { DepartmentContactComponent } from './components/department-contact/department-contact.component';
74-
import { DepartmentDetailsComponent } from './components/department-details/department-details.component';
7573
import { DepartmentListComponent } from './components/department-list/department-list.component';
76-
import { DepartmentOverviewComponent } from './components/department-overview/department-overview.component';
7774
import { EmployeeListComponent } from './components/employee-list/employee-list.component';
7875
import { HomeComponent } from './components/home/home.component';
7976
import { ProductListComponent } from './components/product-list/product-list.component';
80-
import { WildcardPagenotfoundComponent } from './components/wildcard-pagenotfound/wildcard-pagenotfound.component';
8177

8278
const routes: Routes = [
8379
// default path
8480
// { path: '', component:DepartmentListComponent},
8581
{ path: 'home', component: HomeComponent },
86-
{ path: '', redirectTo: 'home', pathMatch: 'full' },
8782
{ path: 'departments', component: DepartmentListComponent },
88-
{
89-
path: 'departments/:id',
90-
component: DepartmentDetailsComponent,
91-
children: [
92-
{ path: 'overview', component: DepartmentOverviewComponent },
93-
{ path: 'contact', component: DepartmentContactComponent },
94-
]
95-
},
9683
{ path: 'employees', component: EmployeeListComponent },
9784
{ path: 'products', component: ProductListComponent },
98-
{ path: '**', component: WildcardPagenotfoundComponent }
9985
];
10086

10187
@NgModule({
@@ -107,14 +93,10 @@ export class AppRoutingModule { }
10793
// to store all routing component and avoid importing/writing duplicate list of components in app.routing.module / app.module.
10894
// create an array of all routing components export it, then import it in app.module.ts
10995
export const RoutingComponents = [
110-
DepartmentContactComponent,
111-
DepartmentDetailsComponent,
11296
DepartmentListComponent,
113-
DepartmentOverviewComponent,
11497
EmployeeListComponent,
11598
HomeComponent,
11699
ProductListComponent,
117-
WildcardPagenotfoundComponent,
118100
]
119101
```
120102

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /