Created
November 14, 2017 18:50
-
-
Save rahulsahay19/62dd25c149095792f7e5798cdeb5c255 to your computer and use it in GitHub Desktop.
dynamic-routing.module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ModuleWithProviders } from '@angular/core'; | |
import { Routes, RouterModule } from '@angular/router'; | |
import DynamicComponent from './dynamic.component'; | |
import { MoviesComponent } from './movies/movies.component'; | |
import { SampleComponent } from './sample.component'; | |
const dynamicRoutes: Routes = [ | |
{ path: '', component: DynamicComponent, pathMatch: 'full' }, | |
{ path: 'movies', component: MoviesComponent}, | |
{ path: 'sample', component: SampleComponent} | |
]; | |
export const routes: ModuleWithProviders = RouterModule.forChild(dynamicRoutes); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment