Code format
This commit is contained in:
@@ -4,8 +4,7 @@ import { map } from 'rxjs/operators';
|
||||
|
||||
@Injectable()
|
||||
export class IconService {
|
||||
|
||||
constructor(private http: HttpClient) { }
|
||||
constructor(private http: HttpClient) {}
|
||||
|
||||
icons!: any[];
|
||||
|
||||
@@ -14,9 +13,11 @@ export class IconService {
|
||||
apiUrl = 'assets/demo/data/icons.json';
|
||||
|
||||
getIcons() {
|
||||
return this.http.get(this.apiUrl).pipe(map((response: any) => {
|
||||
this.icons = response.icons;
|
||||
return this.icons;
|
||||
}));
|
||||
return this.http.get(this.apiUrl).pipe(
|
||||
map((response: any) => {
|
||||
this.icons = response.icons;
|
||||
return this.icons;
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user