| 
									
										
										
										
											2016-06-19 00:20:38 -04:00
										 |  |  | // #docregion
 | 
					
						
							|  |  |  | import { provideRouter, RouterConfig }  from '@angular/router'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import { DashboardComponent } from './dashboard.component'; | 
					
						
							|  |  |  | import { HeroesComponent } from './heroes.component'; | 
					
						
							|  |  |  | // #docregion hero-detail-import
 | 
					
						
							|  |  |  | import { HeroDetailComponent } from './hero-detail.component'; | 
					
						
							|  |  |  | // #enddocregion hero-detail-import
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-07-05 21:20:33 -05:00
										 |  |  | const routes: RouterConfig = [ | 
					
						
							| 
									
										
										
										
											2016-06-19 00:20:38 -04:00
										 |  |  |   { | 
					
						
							|  |  |  |     path: '', | 
					
						
							|  |  |  |     redirectTo: '/dashboard', | 
					
						
							| 
									
										
										
										
											2016-07-01 00:11:33 +02:00
										 |  |  |     pathMatch: 'full' | 
					
						
							| 
									
										
										
										
											2016-06-19 00:20:38 -04:00
										 |  |  |   }, | 
					
						
							|  |  |  |   { | 
					
						
							|  |  |  |     path: 'dashboard', | 
					
						
							|  |  |  |     component: DashboardComponent | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  |   { | 
					
						
							|  |  |  |     path: 'detail/:id', | 
					
						
							|  |  |  |     component: HeroDetailComponent | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  |   { | 
					
						
							|  |  |  |     path: 'heroes', | 
					
						
							|  |  |  |     component: HeroesComponent | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | ]; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-07-05 21:20:33 -05:00
										 |  |  | export const appRouterProviders = [ | 
					
						
							| 
									
										
										
										
											2016-06-19 00:20:38 -04:00
										 |  |  |   provideRouter(routes) | 
					
						
							|  |  |  | ]; |