Background
In my template file I am looping through some data from a http response.
<div *ngFor="let method of paymentMethods">
Within that loop I am outputting
method?.payment_profile_id
Now inside of that loop I want to show one of two elements based on the value of method?.payment_profile_id
.
I am trying to express this inside of a *ngIf
*ngIf="defaultPayment = method?.payment_profile_id"
Or,
*ngIf="defaultPayment != method?.payment_profile_id"
But when trying to do that, I get a parser error,
Parser Error: Bindings cannot contain assignments at column 18 in [defaultPayment = method?.payment_profile_id]
Question
What is the proper way to write this expression?