Add services

This commit is contained in:
Çetin
2025-01-03 12:05:07 +03:00
parent fc8f5eceee
commit d7bb01ce99
7 changed files with 46 additions and 3 deletions
+22
View File
@@ -0,0 +1,22 @@
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { map } from 'rxjs/operators';
@Injectable()
export class IconService {
constructor(private http: HttpClient) { }
icons!: any[];
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;
}));
}
}