penambahan service monitoring
This commit is contained in:
16
src/app/content/hemat-app/service/monitoring-api.service.ts
Normal file
16
src/app/content/hemat-app/service/monitoring-api.service.ts
Normal 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 });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user