So I have this (shortened/condensed for example purposes) InnerHtml string...
public get Description(): string {
if (this.Description.length > 50) {
return this.Description.substring(0, 50) + this.DescriptionToggle;
} else {
return this.Description;
}
}
public get DescriptionToggle(): string {
return "<a [routerLink]='' (click)='ExpandDescription(Item)'>(show more)</a>"
}
And then in my HTML...
<small [innerHtml]="Item.Description | safe: 'html'"></small>
Which joins the two together like I want when the length is > 50, but it doesn't seem to actually add the a tag functionality/styling (clicking on it does nothing, no blue text, etc.)
What am I doing wrong here? Is it possible to concat an existing innerHtml element with another?