|
1 | | -import {Routes} from '@angular/router'; |
2 | | -import {AboutComponent} from './about/about.component'; |
3 | | -import {HomeComponent} from './home/home.component'; |
4 | | -import {RepoBrowserComponent} from './github/repo-browser/repo-browser.component'; |
5 | | -import {RepoListComponent} from './github/repo-list/repo-list.component'; |
6 | | -import {RepoDetailComponent} from './github/repo-detail/repo-detail.component'; |
| 1 | +import { Routes } from '@angular/router'; |
| 2 | + |
| 3 | +import { AboutComponent } from './about/about.component'; |
| 4 | +import { HomeComponent } from './home/home.component'; |
| 5 | +import { RepoBrowserComponent } from './github/repo-browser/repo-browser.component'; |
| 6 | +import { RepoListComponent } from './github/repo-list/repo-list.component'; |
| 7 | +import { RepoDetailComponent } from './github/repo-detail/repo-detail.component'; |
7 | 8 | import { ContactComponent } from './contact/contact.component'; |
8 | 9 |
|
9 | 10 | export const rootRouterConfig: Routes = [ |
10 | | - {path: '', redirectTo: 'home', pathMatch: 'full'}, |
11 | | - {path: 'home', component: HomeComponent}, |
12 | | - {path: 'about', component: AboutComponent}, |
13 | | - {path: 'github', component: RepoBrowserComponent, |
| 11 | + { path: '', redirectTo: 'home', pathMatch: 'full' }, |
| 12 | + { path: 'home', component: HomeComponent }, |
| 13 | + { path: 'about', component: AboutComponent }, |
| 14 | + { path: 'github', component: RepoBrowserComponent, |
14 | 15 | children: [ |
15 | | - {path: '', component: RepoListComponent}, |
16 | | - {path: ':org', component: RepoListComponent, |
| 16 | + { path: '', component: RepoListComponent }, |
| 17 | + { path: ':org', component: RepoListComponent, |
17 | 18 | children: [ |
18 | | - {path: '', component: RepoDetailComponent}, |
19 | | - {path: ':repo', component: RepoDetailComponent} |
| 19 | + { path: '', component: RepoDetailComponent }, |
| 20 | + { path: ':repo', component: RepoDetailComponent } |
20 | 21 | ] |
21 | 22 | }] |
22 | 23 | }, |
23 | | - {path: 'contact', component: ContactComponent} |
| 24 | + { path: 'contact', component: ContactComponent } |
24 | 25 | ]; |
25 | 26 |
|
0 commit comments