27 lines
		
	
	
		
			769 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			769 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
// #docregion
 | 
						|
import { NgModule }              from '@angular/core';
 | 
						|
import { RouterModule, Routes }  from '@angular/router';
 | 
						|
 | 
						|
import { CrisisListComponent }   from './crisis-list.component';
 | 
						|
import { HeroListComponent }     from './hero-list.component';
 | 
						|
import { PageNotFoundComponent } from './not-found.component';
 | 
						|
 | 
						|
// #docregion appRoutes
 | 
						|
const appRoutes: Routes = [
 | 
						|
  { path: 'crisis-center', component: CrisisListComponent },
 | 
						|
  { path: 'heroes',        component: HeroListComponent },
 | 
						|
  { path: '',   redirectTo: '/heroes', pathMatch: 'full' },
 | 
						|
  { path: '**', component: PageNotFoundComponent }
 | 
						|
];
 | 
						|
// #enddocregion appRoutes
 | 
						|
 | 
						|
@NgModule({
 | 
						|
  imports: [
 | 
						|
    RouterModule.forRoot(appRoutes)
 | 
						|
  ],
 | 
						|
  exports: [
 | 
						|
    RouterModule
 | 
						|
  ]
 | 
						|
})
 | 
						|
export class AppRoutingModule {}
 |