penambahan service monitoring

This commit is contained in:
2024-05-13 16:07:19 +07:00
parent 6239e473b3
commit cfa140b6ea
3 changed files with 27 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
import { Injectable } from "@angular/core";
import { HttpClient, HttpHeaders } from "@angular/common/http";
import { Observable } from "rxjs";
@Injectable({
providedIn: "root",
})
export class BuildingService {
constructor(private http: HttpClient) {}
getBuildingData(page: number = 1, limit: number = 10): Observable<any> {
const url = `http://167.86.72.99:3100/building?page=${page}&limit=${limit}`;
const headers = new HttpHeaders().set('Content-Type', 'application/json');
return this.http.get<any>(url, { headers });
}
}