Skip to content
This repository was archived by the owner on Jul 13, 2022. It is now read-only.

Commit 94c8426

Browse files
committed
fix(icon-set.service): add get iconNames prop
1 parent d1dba10 commit 94c8426

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

projects/coreui-icons-angular/src/lib/icon-set/icon-set.service.ts

+8-3
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,21 @@ export class IconSetService {
1111

1212
constructor() {}
1313

14-
// tslint:disable-next-line:variable-name
15-
private _icons: IIconSet = {};
14+
public get iconNames() {
15+
return this._iconNames;
16+
};
17+
private _iconNames: { [key: string]: string } = {};
1618

1719
get icons(): IIconSet {
1820
return this._icons;
1921
}
20-
2122
set icons(iconSet) {
23+
for (const iconsKey in iconSet) {
24+
this._iconNames[iconsKey] = iconsKey;
25+
}
2226
this._icons = iconSet;
2327
}
28+
private _icons: IIconSet = {};
2429

2530
public getIcon(name: string): string[] {
2631
const icon = this.icons[name];

0 commit comments

Comments
 (0)