Refactor style cache

This commit is contained in:
Willem Dantuma
2020-02-12 20:38:14 +01:00
parent b83aca7969
commit 6379b64351
9 changed files with 258 additions and 224 deletions

View File

@@ -4,9 +4,7 @@ import {IItem} from '../models/item'
import {AppConfig} from '../shared/app.config';
import {HttpClient, HttpXhrBackend} from '@angular/common/http';
@Injectable({
providedIn: 'root',
})
@Injectable()
export class ItemTypeService {
public itemTypes: IItemTypes;
private httpClient: HttpClient;
@@ -15,10 +13,6 @@ export class ItemTypeService {
this.httpClient = new HttpClient(xhrBackend);
}
// itemService.getItemTypes().subscribe((itemTypes) => {
// this.itemTypes = itemTypes;
// });
getIcon(itemType: string) {
var icon = "fa fa-file-o";
if (this.itemTypes[itemType]) icon = this.itemTypes[itemType].icon;