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!")
}
I am struggling with tweaking my Angular JS application. There is the whole application where in the end I'd like to use my app.css file as a style sheet. So each state like: domain/#/articles ...
I am struggling with tweaking my Angular JS application. There is the whole application where in the end I'd like to use my app.css file as a style sheet. So each state like: domain/#/articles ...
Trying to update data using PUT request. But, the data is not updating and returning the previous data in postman. Postman put request: http://localhost:3000/api/actors/5daa8f1c5845ad0b5826b8d9?name=...
Trying to update data using PUT request. But, the data is not updating and returning the previous data in postman. Postman put request: http://localhost:3000/api/actors/5daa8f1c5845ad0b5826b8d9?name=...
I'm using the radio slider as given here: Radio Slider. I want to put a dropdown on the right side of this slider, which I'm doing using display:inline-block like this: <div class="wrapper ...
I'm using the radio slider as given here: Radio Slider. I want to put a dropdown on the right side of this slider, which I'm doing using display:inline-block like this: <div class="wrapper ...
I have an algorithm that examines an array of Event (StartTime,EndTime) on a timeline that runs from Midnight->Midnight to check for any gaps. The algorithm works, but there is one configuration where ...
I have an algorithm that examines an array of Event (StartTime,EndTime) on a timeline that runs from Midnight->Midnight to check for any gaps. The algorithm works, but there is one configuration where ...