Currently, I have ng-template defined as below which works well, but I wanted to have the let variable defined with dynamic value, can you please help me how to solve this problem?
Working
<ng-template #topTemplate ng-label-tmp let-item="item" let-clear="clear"
aria-autocomplete="none" let-insideSubItemTop="item.parent.name">
<div class="badge badge-pill df-closable badge-blue">
{{insideSubItemTop}}
<button type="button" [badgeEventListener]="[clear, item]">
<span aria-hidden="true" class="icon-times"></span>
</button>
</div>
</ng-template>
But I wanted to define the value in ng-template based on the computation done in the component.ts
Not Working
let-insideSubItemTop="{{computedInComponent}}"
So I tried in my component.ts with
computedInComponent = 'item.parent.name';
The above is not working, can some help me how to achieve this?