parent
475886ab96
commit
6f4d766328
@ -1,5 +1,11 @@
|
||||
<div>
|
||||
<h1>Projet Recipe</h1>
|
||||
<br />
|
||||
<h2>Commandes en cours</h2>
|
||||
<ul>
|
||||
<li *ngFor="let recipe of currentOrders">
|
||||
{{ recipe.name }}
|
||||
</li>
|
||||
</ul>
|
||||
<p>Bienvenue sur Recipe</p>
|
||||
</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({
|
||||
selector: 'app-home',
|
||||
standalone: true,
|
||||
imports: [],
|
||||
imports: [CommonModule],
|
||||
templateUrl: './home.component.html',
|
||||
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