Skip to content
Permalink
Browse files

Routing and Navigation

  • Loading branch information
amejiarosario committed Aug 7, 2018
1 parent 4703dd0 commit 3a38b4d8e0a77facd40e7769c575ea47bbaa7dbf
Showing with 8 additions and 2 deletions.
  1. +1 −1 src/app/app.component.html
  2. +7 −1 src/app/app.module.ts
@@ -1 +1 @@
<app-todo></app-todo>
<router-outlet></router-outlet>
@@ -1,18 +1,24 @@
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
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,
TodoComponent
],
imports: [
BrowserModule,
FormsModule
FormsModule,
RouterModule.forRoot(routes)
],
providers: [],
bootstrap: [AppComponent]

0 comments on commit 3a38b4d

Please sign in to comment.
You can’t perform that action at this time.