I have a template string that evaluates an Observable:
<button [title]="filterButtonText">
{{ selectedUsers$ | async | delimiter:"|"}}
</button>
The delimiter pipe converts the string to "User1|User2" etc. I want to use the same value in the title property like :
<button [title]="{{ selectedUsers$ | async | delimiter:"|"}}">
{{ selectedUsers$ | async | delimiter:"|"}}
</button>
But this doesn't seem to work. I want to reuse the output of
{{ selectedUsers$ | async | delimiter:"|"}} in the title property. How can I do it? Or is there is a better of the way of achieving this without re-evaluating the observable?
EDIT
<button [title]="selectedUsers$ | async | delimiter:'|'">
{{ selectedUsers$ | async | delimiter:"|"}}
</button>
Removing {{ }} worked. But another question, is there a way I can evaluate this in one place ? Without having the same statement in two places ?