mise en place du html et lien vers le back de repertoire
This commit is contained in:
parent
68e1df8eb7
commit
4a55d75da7
20 changed files with 221 additions and 14 deletions
28
src/app/services/repertoire.service.ts
Normal file
28
src/app/services/repertoire.service.ts
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { map, Observable } from 'rxjs';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { Contact } from '../models/contact';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class RepertoireService {
|
||||
apiUrl: string;
|
||||
tokenKey: string;
|
||||
|
||||
constructor(private http: HttpClient) {
|
||||
// On se sert des variables d'environnement de notre application
|
||||
this.apiUrl = environment.apiUrl;
|
||||
this.tokenKey = environment.tokenKey;
|
||||
}
|
||||
|
||||
getContact(): Observable<any> {
|
||||
return this.http.get(`${this.apiUrl}/contacts/team/1`);
|
||||
}
|
||||
|
||||
//sur le component fiche contact de la page repertoire
|
||||
// sur clic de btn modifier ou supproimer ca renvois vers page modifier contact
|
||||
//page modifier contact faire un get by id du contact en question
|
||||
// appeler methode/ update /delette/ add et contact by id
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue