move router module into app imports

master
Matt Huntington 9 years ago
parent a962b53f22
commit f29f870377

@ -1,4 +1 @@
<h1>Welcome to {{title}}!!</h1> <h1>Welcome to {{title}}!!</h1>
<app-about></app-about>
<app-links></app-links>
<app-resume></app-resume>

@ -8,21 +8,6 @@ import { LinksComponent } from './links/links.component';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
RouterModule.forRoot([
{
path: 'about',
component: AboutComponent
},
{
path: 'resume',
component: ResumeComponent
},
{
path: 'links',
component: LinksComponent
}
]);
@NgModule({ @NgModule({
declarations: [ declarations: [
AppComponent, AppComponent,
@ -31,7 +16,21 @@ RouterModule.forRoot([
LinksComponent LinksComponent
], ],
imports: [ imports: [
BrowserModule BrowserModule,
RouterModule.forRoot([
{
path: 'about',
component: AboutComponent
},
{
path: 'resume',
component: ResumeComponent
},
{
path: 'links',
component: LinksComponent
}
])
], ],
providers: [], providers: [],
bootstrap: [AppComponent] bootstrap: [AppComponent]

Loading…
Cancel
Save