19 lines
481 B
TypeScript
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 });
|
|
}
|
|
}
|