menu service
This commit is contained in:
parent
d89214db19
commit
26032019c5
13 changed files with 11706 additions and 40 deletions
|
|
@ -1 +1,5 @@
|
|||
<p>card-menu works!</p>
|
||||
<div class="menu">
|
||||
<div *ngFor="let menu of listMenus">
|
||||
<p>{{ menu.dateMenu }} {{ menu.libelle }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
.menu {
|
||||
margin-left: 500px;
|
||||
}
|
||||
|
|
@ -1,4 +1,9 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { Menu } from 'src/app/models/menu';
|
||||
import { MenusService } from 'src/app/services/menus.service';
|
||||
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-card-menu',
|
||||
|
|
@ -6,10 +11,23 @@ import { Component, OnInit } from '@angular/core';
|
|||
styleUrls: ['./card-menu.component.scss']
|
||||
})
|
||||
export class CardMenuComponent implements OnInit {
|
||||
public listMenus:any[];
|
||||
|
||||
constructor() { }
|
||||
constructor(
|
||||
private menusService: MenusService,
|
||||
private router: Router,
|
||||
private route: ActivatedRoute
|
||||
) {
|
||||
this.listMenus=[];
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
//affichage des menus d'une team
|
||||
this.menusService.getMenu()?.subscribe((listMenus: any[])=>{
|
||||
console.log(listMenus);
|
||||
this.listMenus=listMenus;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue