I am new to Angular.
How do I start a function from within a *ngIf= directive, when certain criterions are NOT met?
Note that in my code, below, the first *ngIf successfully displays a {{tab1TrxMessage}} message if a tab1TrxMessage is available.
<div (click)="clearForm(1)" *ngIf="tab1TrxId" class="sign-btn text-center fixedNotification" style="margin-top: 20px">
<a class="btn btn-lg text-white" [ngClass]="trx1Btn">
<span *ngIf="tab1TrxMessage">{{tab1TrxMessage}}</span>
<span *ngIf="!tab1TrxMessage && tab1TrxStatus != 'Success'" "testing123()">Failed</span>
</a>
</div>
However, in the second *ngIf directive, I if there isn't tab1TrxMessage message and the tab1TrxStatus status isnt of satus Success, I'd like this function testing123() to fire up!
Can anyone kindly help me understand how to achieve this as the current doesnt work.
Following is the .ts file content:
testing123(){
console.log("Testing if this works!")
}