diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts new file mode 100644 index 0000000..8a8cbc1 --- /dev/null +++ b/src/app/app-routing.module.ts @@ -0,0 +1,19 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router' + +import { RecipesComponent } from './recipes/recipes.component'; +import { ShoppingListComponent } from './shopping-list/shopping-list.component'; + +const appRoutes: Routes = [ + { path: '', redirectTo: '/recipes', pathMatch: 'full' }, + { path: 'recipes' , component: RecipesComponent }, + { path: 'shopping-list', component: ShoppingListComponent } +]; + +@NgModule({ + imports: [RouterModule.forRoot(appRoutes)], + exports: [RouterModule] +}) +export class AppRoutingModule { + +} \ No newline at end of file diff --git a/src/app/app.component.html b/src/app/app.component.html index 1c65680..1042b03 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -2,8 +2,7 @@