summaryrefslogtreecommitdiff
path: root/recipeBuddy/src
diff options
context:
space:
mode:
Diffstat (limited to 'recipeBuddy/src')
-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;
+ }
+}