import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; import { SERVER_API_URL } from 'app/app.constants'; import { SearchResultsDTO } from 'app/shared/model/search/search-results-dto.model'; import { SearchInput } from 'app/shared/model/search-input.model'; @Injectable({ providedIn: 'root' }) export class SearchService { public resourceSearchUrlPageDetails = SERVER_API_URL + 'api/search/page-details'; constructor(protected http: HttpClient) {} searchPageDetails(searchInput: SearchInput): Observable<SearchResultsDTO> { return this.http .post<SearchResultsDTO>(this.resourceSearchUrlPageDetails, searchInput); } }