We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 323f664 commit 5b5f701Copy full SHA for 5b5f701
src/app/app.component.ts
@@ -1,6 +1,7 @@
1
import { Component, OnInit } from '@angular/core';
2
import { RecipeService } from "app/recipes/recipe.service";
3
import { FoodService } from "app/food/food.service";
4
+import { AuthService } from 'app/auth/auth.service';
5
6
@Component({
7
selector: 'app-root',
@@ -15,8 +16,13 @@ export class AppComponent implements OnInit {
15
16
17
constructor(
18
private recipeService: RecipeService,
- private foodService:FoodService
19
+ private foodService: FoodService,
20
+ private authService: AuthService,
21
) {
22
+ if (this.authService.isAuthed()) {
23
+ this.recipeService.loadRecipes();
24
+ this.foodService.loadFood();
25
+ }
26
27
}
28
title = 'app';
0 commit comments