Files
grimmory/booklore-ui/src/app/book/service/utility.service.ts
T
aditya.chandel baff376b9c Initial commit
2024-12-13 12:58:23 -07:00

19 lines
481 B
TypeScript

import { Injectable } from '@angular/core';
import {Observable} from 'rxjs';
import {HttpClient, HttpParams} from '@angular/common/http';
@Injectable({
providedIn: 'root'
})
export class UtilityService {
private pathUrl = 'http://localhost:8080/v1/path';
constructor(private http: HttpClient) { }
getFolders(path: string): Observable<string[]> {
const params = new HttpParams().set('path', path);
return this.http.get<string[]>(this.pathUrl, { params });
}
}