parent
1f6f49cf3e
commit
f8ab651da6
@ -1,8 +0,0 @@ |
|||||||
<div class="row mb-2"> |
|
||||||
|
|
||||||
<div class="form-group col-12 col-sm-6 col-md-4 col-lg-3"> |
|
||||||
|
|
||||||
<label for="agence-name" class="form-label">Nom</label> |
|
||||||
<input class="form-control" id="agence-name" [(ngModel)]="agence.name" placeholder="name"> |
|
||||||
</div> |
|
||||||
</div> |
|
@ -1,31 +0,0 @@ |
|||||||
import {Component, Input, OnInit} from '@angular/core'; |
|
||||||
import {Agence} from "../../../interfaces/agence"; |
|
||||||
import {HttpClient} from "@angular/common/http"; |
|
||||||
import {AgenceService} from "../../../services/agence.service"; |
|
||||||
@Component({ |
|
||||||
selector: 'app-agence-detail', |
|
||||||
templateUrl: './agence-detail.component.html', |
|
||||||
styleUrls: ['./agence-detail.component.scss'] |
|
||||||
}) |
|
||||||
export class AgenceDetailComponent implements OnInit { |
|
||||||
|
|
||||||
agences : Agence[] = []; |
|
||||||
@Input() |
|
||||||
agence = {} as Agence ; |
|
||||||
|
|
||||||
constructor( |
|
||||||
private http : HttpClient, |
|
||||||
private agenceService: AgenceService, |
|
||||||
) { } |
|
||||||
|
|
||||||
ngOnInit(): void { |
|
||||||
this.getAgences(); |
|
||||||
this.getAgences(); |
|
||||||
} |
|
||||||
|
|
||||||
getAgences():void { |
|
||||||
this.agenceService.getAgences() |
|
||||||
.subscribe(agences => this.agences = agences); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
Loading…
Reference in new issue