This commit was worked on by a number of people including @filipesilva, @gkalpak and @wardbell. It contains changes that: * remove unused files, * fix the bootstrap approach to ensure that bootstrap is in the correct Zone * fix unclosed code-example tags * replace use of "we" with "you" * remove broken dual router example Related to angular/angular.io#3541
		
			
				
	
	
		
			24 lines
		
	
	
		
			822 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			822 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| // #docregion
 | |
| import { NgModule } from '@angular/core';
 | |
| import { Routes, RouterModule } from '@angular/router';
 | |
| import { APP_BASE_HREF, HashLocationStrategy, LocationStrategy } from '@angular/common';
 | |
| 
 | |
| import { PhoneDetailComponent } from './phone-detail/phone-detail.component';
 | |
| import { PhoneListComponent }   from './phone-list/phone-list.component';
 | |
| 
 | |
| const routes: Routes = [
 | |
|   { path: '', redirectTo: 'phones', pathMatch: 'full' },
 | |
|   { path: 'phones',          component: PhoneListComponent },
 | |
|   { path: 'phones/:phoneId', component: PhoneDetailComponent }
 | |
| ];
 | |
| 
 | |
| @NgModule({
 | |
|   imports: [ RouterModule.forRoot(routes) ],
 | |
|   exports: [ RouterModule ],
 | |
|   providers: [
 | |
|     { provide: APP_BASE_HREF, useValue: '!' },
 | |
|     { provide: LocationStrategy, useClass: HashLocationStrategy },
 | |
|   ]
 | |
| })
 | |
| export class AppRoutingModule { }
 |