summaryrefslogtreecommitdiff
path: root/recipeBuddy/src/app/recipePass
diff options
context:
space:
mode:
authorTucker Evans <tuckerevans24@gmail.com>2019-12-10 17:11:32 -0500
committerJacob <gatelyjm@clarkson.edu>2019-12-10 05:39:46 -0500
commit3a1102e4d6b8443fbe5d2e9ee7243676af662737 (patch)
tree8f1f71e8844d34e2735493455d4f04423a2779c9 /recipeBuddy/src/app/recipePass
parent7698331e4bb85232535182eeeaa09fdf54b66a76 (diff)
parent0f8d2ab5d57334320f8c60b626c5af455eddae4f (diff)
Merge branch 'master' into main-page-in-progresstest-main
Diffstat (limited to 'recipeBuddy/src/app/recipePass')
-rw-r--r--recipeBuddy/src/app/recipePass/recipe-pass.service.spec.ts12
-rw-r--r--recipeBuddy/src/app/recipePass/recipe-pass.service.ts20
2 files changed, 32 insertions, 0 deletions
diff --git a/recipeBuddy/src/app/recipePass/recipe-pass.service.spec.ts b/recipeBuddy/src/app/recipePass/recipe-pass.service.spec.ts
new file mode 100644
index 0000000..f3a8388
--- /dev/null
+++ b/recipeBuddy/src/app/recipePass/recipe-pass.service.spec.ts
@@ -0,0 +1,12 @@
+import { TestBed } from '@angular/core/testing';
+
+import { RecipePassService } from './recipe-pass.service';
+
+describe('RecipePassService', () => {
+ beforeEach(() => TestBed.configureTestingModule({}));
+
+ it('should be created', () => {
+ const service: RecipePassService = TestBed.get(RecipePassService);
+ expect(service).toBeTruthy();
+ });
+});
diff --git a/recipeBuddy/src/app/recipePass/recipe-pass.service.ts b/recipeBuddy/src/app/recipePass/recipe-pass.service.ts
new file mode 100644
index 0000000..e925973
--- /dev/null
+++ b/recipeBuddy/src/app/recipePass/recipe-pass.service.ts
@@ -0,0 +1,20 @@
+import { Injectable } from '@angular/core';
+import { Recipe } from '../DataModels/recipe';
+
+@Injectable({
+ providedIn: 'root',
+})
+export class RecipePassService {
+
+ private sourceRecipe: Recipe;
+
+ constructor() { }
+
+ public setRecipe (recipeToPass: Recipe) {
+ this.sourceRecipe = recipeToPass;
+ }
+
+ public getRecipe (): Recipe {
+ return this.sourceRecipe;
+ }
+}