Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Cannot compare value using ngIf

$
0
0

@mhtchong wrote:

I’m trying to compare values using ngIf and only show the div when it’s true. However, I cannot seem to solve this.

.TS code:

constructor(public navCtrl: NavController, public navParams: NavParams, public dp: DatabaseProvider) {

  	this.walletId = navParams.get('wallet_id');
    this.walletName = navParams.get('name');

  }

HTML code:

<ion-list>
<ion-item *ngFor="let item of histories" text-wrap>
<div *ngIf="item.wallet_id == [walletId]">
	  <p>Some content here</p>
</div>
 </ion-item>
</ion-list>

Thank you!

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>