From ecda7b74d1e52edc29493dcc15dec85a5ad0ef8f Mon Sep 17 00:00:00 2001 From: Chris Undercoffer Date: Wed, 11 Dec 2019 17:16:18 -0500 Subject: Add routing and imports for shopping cart --- recipeBuddy/src/app/app-routing.module.ts | 2 ++ recipeBuddy/src/app/app.module.ts | 7 +++++++ recipeBuddy/src/app/shopping-cart/shopping-cart.component.ts | 3 +++ 3 files changed, 12 insertions(+) diff --git a/recipeBuddy/src/app/app-routing.module.ts b/recipeBuddy/src/app/app-routing.module.ts index 0084f01..ae67546 100644 --- a/recipeBuddy/src/app/app-routing.module.ts +++ b/recipeBuddy/src/app/app-routing.module.ts @@ -5,6 +5,7 @@ import { CookPageComponent } from './cook-page/cook-page.component'; import { PreCookPopUpComponent } from './pre-cook-pop-up/pre-cook-pop-up.component'; import { AddRecipeComponent } from './add-recipe/add-recipe.component'; import { EditRecipeComponent } from './edit-recipe/edit-recipe.component'; +import { ShoppingCartComponent } from './shopping-cart/shopping-cart.component'; const routes: Routes = [ { path: '', redirectTo: '/cook', pathMatch: 'full' }, @@ -12,6 +13,7 @@ const routes: Routes = [ { path: 'add', component: AddRecipeComponent }, { path: 'cook', component: CookPageComponent }, { path: 'edit', component: EditRecipeComponent }, + { path: 'cart', component: ShoppingCartComponent } ]; @NgModule({ diff --git a/recipeBuddy/src/app/app.module.ts b/recipeBuddy/src/app/app.module.ts index c2bdc68..a805e9e 100644 --- a/recipeBuddy/src/app/app.module.ts +++ b/recipeBuddy/src/app/app.module.ts @@ -6,6 +6,7 @@ import { MatDialogModule } from '@angular/material'; import { AppComponent } from './app.component'; import { CookPageComponent} from './cook-page/cook-page.component'; +import { ShoppingCartComponent } from './shopping-cart/shopping-cart.component'; //import { RecipePassService } from './recipePass/recipe-pass.service'; import { AppRoutingModule } from './app-routing.module'; @@ -23,6 +24,8 @@ import { MatIconModule } from '@angular/material/icon'; import { MatButtonModule } from '@angular/material/button'; import { MatToolbarModule } from '@angular/material/toolbar'; import { EditRecipeComponent } from './edit-recipe/edit-recipe.component'; +import { MatListModule } from '@angular/material/list'; +import { MatDividerModule } from '@angular/material/divider'; @NgModule({ declarations: [ @@ -31,6 +34,7 @@ import { EditRecipeComponent } from './edit-recipe/edit-recipe.component'; PreCookPopUpComponent, AddRecipeComponent, EditRecipeComponent, + ShoppingCartComponent ], imports: [ BrowserModule, @@ -44,6 +48,9 @@ import { EditRecipeComponent } from './edit-recipe/edit-recipe.component'; MatIconModule, MatButtonModule, MatToolbarModule, + MatDividerModule, + MatListModule, + FormsModule ], bootstrap: [AppComponent], // providers: [RecipePassService] diff --git a/recipeBuddy/src/app/shopping-cart/shopping-cart.component.ts b/recipeBuddy/src/app/shopping-cart/shopping-cart.component.ts index 7c3f6fa..26808ee 100644 --- a/recipeBuddy/src/app/shopping-cart/shopping-cart.component.ts +++ b/recipeBuddy/src/app/shopping-cart/shopping-cart.component.ts @@ -3,6 +3,9 @@ import { MatSelectModule } from '@angular/material/select'; import { MatDividerModule } from '@angular/material/divider'; import { BackendService } from '../REST_service/backend.service'; import { FormsModule } from '@angular/forms'; +import { Recipe } from '../DataModels/recipe'; +import { Ingredient } from '../DataModels/ingredient'; + -- cgit v1.1