Files
psp_panel/src/service/icon.service.ts
T

23 lines
494 B
TypeScript
Raw Normal View History

2021-12-09 17:24:42 +03:00
import { Injectable } from '@angular/core';
2022-07-22 13:13:50 +03:00
import { HttpClient } from '@angular/common/http';
import { map } from 'rxjs/operators';
2021-12-09 17:24:42 +03:00
@Injectable()
export class IconService {
constructor(private http: HttpClient) { }
2022-07-22 13:13:50 +03:00
icons!: any[];
2021-12-09 17:24:42 +03:00
selectedIcon: any;
apiUrl = 'assets/demo/data/icons.json';
getIcons() {
return this.http.get(this.apiUrl).pipe(map((response: any) => {
this.icons = response.icons;
return this.icons;
}));
}
}