Skip to content
Permalink
Browse files

Routing and Navigation

  • Loading branch information
amejiarosario committed Nov 7, 2019
1 parent a4aeaa4 commit 2e2bae932fc5170f102acb7d5b7fbfaa70ebd82e
Showing with 7 additions and 2 deletions.
  1. +1 −1 src/app/app.component.html
  2. +6 −1 src/app/app.module.ts
@@ -1 +1 @@
<app-todo></app-todo>
<router-outlet></router-outlet>
@@ -1,12 +1,16 @@
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { Routes, RouterModule } from '@angular/router';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { TodoComponent } from './todo/todo.component';


const routes: Routes = [
{ path: ':status', component: TodoComponent },
{ path: '**', redirectTo: '/all' }
];

@NgModule({
declarations: [
@@ -17,6 +21,7 @@ import { TodoComponent } from './todo/todo.component';
BrowserModule,
AppRoutingModule,
FormsModule,
RouterModule.forRoot(routes),
],
providers: [],
bootstrap: [AppComponent]

0 comments on commit 2e2bae9

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