I've been googling around, and am still a bit new to angular 5/6, but I'm trying to see if something is possible.
Problem
Say I have a template:
<ng-template #rt let-r="result" let-t="term">
<ngb-highlight [result]="r.typeAheadDisplayName" [term]="t" ></ngb-highlight>
<span *ngIf="r.primaryName ">(alias for {{ r.primaryName }}) </span>{{ r.metaData }}
</ng-template>
Within this template a button will generate that can be used as a means of chosing an option. However, for a given reason I need to be able to target :first-child
of the array of buttons.
I know that I can select the element/template doing:
@ViewChild('rt') rt : TemplateRef<any>;
but, can I actually do a function similar to jQuery's .find
or even the same in AngularJS, to target the elements that would be found inside of this template. I've been googling and can't see to find an answer.