There must be a more elegant way of doing this.
I'm simply; passing this boolean flag from the page markup through to the subcomponent:
<span *ngIf="flushToText">
<span
class="icon flushToText"
[title]="tooltip" >
</span>
</span>
<span *ngIf="!flushToText">
<span
class="icon"
[title]="tooltip">
</span>
</span>
Essentially, this says: if flushToText is TRUE, then add class flushToText.
(Here's the markup that invokes it:)
<app-td-label
id="industry"
tooltip="Enter key words"
bold="true"
flushToText="true">
</app-td-label>
I tried ng-class, but I could not seem to get the right syntax. I tried every combination of quotes and brackets:
ng-class="flushToText: flushToText"
ng-class="'flushToText': flushToText"
ng-class="{'flushToText': flushToText==true}"
etc.