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 { 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(url, { headers }); } }