-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathapp-routing.module.ts
More file actions
31 lines (28 loc) · 946 Bytes
/
app-routing.module.ts
File metadata and controls
31 lines (28 loc) · 946 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {
ContactsListComponent,
NewContactComponent,
EditContactComponent,
FavoritesContactsComponent
} from './contacts/components';
import { ProfileComponent } from './profile/profile.component';
import { DashboardComponent } from './dashboard/dashboard.component';
const routes: Routes = [
{ path: 'contacts', component: ContactsListComponent },
{ path: 'favorites', component: FavoritesContactsComponent },
{ path: 'dashboard', component: DashboardComponent },
{ path: 'new-contact', component: NewContactComponent },
{ path: 'contacts/:id', component: EditContactComponent },
{ path: 'profile', component: ProfileComponent },
{
path: '',
redirectTo: '/contacts',
pathMatch: 'full'
}
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }