How to add directive depend on condition variable

Currently I just think about this way but need to know if there is better way:

<button primary clear small *ngIf="!thanked"></button> <button clear small *ngIf="thanked"></button>