Permalink
Browse files

Routing and Navigation

  • Loading branch information...
amejiarosario committed Oct 18, 2016
1 parent 161be3b commit 4a7f71516264e21b5b03e281d68b508492bbcc19
Showing with 9 additions and 2 deletions.
  1. +1 −1 src/app/app.component.html
  2. +8 −1 src/app/app.module.ts
@@ -1 +1 @@
<app-todo></app-todo>
<router-outlet></router-outlet>
View
@@ -2,10 +2,16 @@ import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { Routes, RouterModule } from '@angular/router';
import { AppComponent } from './app.component';
import { TodoComponent } from './todo/todo.component';
const routes: Routes = [
{ path: ':status', component: TodoComponent },
{ path: '**', redirectTo: '/all' }
];
@NgModule({
declarations: [
AppComponent,
@@ -14,7 +20,8 @@ import { TodoComponent } from './todo/todo.component';
imports: [
BrowserModule,
FormsModule,
HttpModule
HttpModule,
RouterModule.forRoot(routes)
],
providers: [],
bootstrap: [AppComponent]

0 comments on commit 4a7f715

Please sign in to comment.