Created
August 29, 2019 19:38
-
-
Save nanotroy/fed70c597ca33d990b9b6c0dadbe42fe to your computer and use it in GitHub Desktop.
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 { NgModule } from '@angular/core'; | |
import { RouterModule } from '@angular/router'; | |
import { FirstComponent } from './first/first.component'; | |
import { SecondComponent } from './second/second.component'; | |
@NgModule({ | |
imports: [ | |
RouterModule.forRoot([ | |
{ path: '', redirectTo: '/firstComponent', pathMatch: 'full' }, | |
{ path: 'firstComponent', component: FirstComponent }, | |
{ path: 'secondComponent', component: SecondComponent } | |
]) | |
], | |
exports: [ RouterModule ] | |
}) | |
export class AppRoutingModule {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment