Minor fix in tb-icon custom image feature - add alt attribute.
This commit is contained in:
parent
f2e66ca012
commit
a4cf5f7d32
@ -304,6 +304,7 @@ export class TbIconComponent extends _TbIconBase
|
||||
imageUrl => {
|
||||
const imgElement = this.renderer.createElement('img');
|
||||
this.renderer.addClass(imgElement, 'mat-icon');
|
||||
this.renderer.setAttribute(imgElement, 'alt', 'Image icon');
|
||||
this.renderer.setAttribute(imgElement, 'src', imageUrl as string);
|
||||
const elem: HTMLElement = this._elementRef.nativeElement;
|
||||
this.renderer.insertBefore(elem, imgElement, this._iconNameContent.nativeElement);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user