parent
475886ab96
commit
6f4d766328
@ -1,5 +1,11 @@
|
|||||||
<div>
|
<div>
|
||||||
<h1>Projet Recipe</h1>
|
<h1>Projet Recipe</h1>
|
||||||
<br />
|
<br />
|
||||||
|
<h2>Commandes en cours</h2>
|
||||||
|
<ul>
|
||||||
|
<li *ngFor="let recipe of currentOrders">
|
||||||
|
{{ recipe.name }}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
<p>Bienvenue sur Recipe</p>
|
<p>Bienvenue sur Recipe</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,12 +1,22 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { Recipe } from '../models/recipe';
|
||||||
|
import { RecipeService } from '../services/recipe.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-home',
|
selector: 'app-home',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [],
|
imports: [CommonModule],
|
||||||
templateUrl: './home.component.html',
|
templateUrl: './home.component.html',
|
||||||
styleUrl: './home.component.scss'
|
styleUrl: './home.component.scss'
|
||||||
})
|
})
|
||||||
export class HomeComponent {
|
export class HomeComponent implements OnInit {
|
||||||
|
currentOrders: Recipe[] = [];
|
||||||
|
|
||||||
|
constructor(private recipeService: RecipeService) {}
|
||||||
|
|
||||||
|
ngOnInit(): void {
|
||||||
|
// Charger les commandes en cours depuis le service
|
||||||
|
this.currentOrders = this.recipeService.getCurrentOrders();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in new issue