angularjs - ngif is not working properly -


i want use ngif check int comes function, , if bigger 0 want present it, did:

 <div> <b>name:</b>{{person.getname()}}<b>balance left:</b> <div *ngif="person.getbalance()>0">{{bulk.getbalance()}}</div> </div> 

but blanc page, if remove ngif fine, need it, doing wrong?

this data comes array called "person"

tnx

you misspelled it. try removing * , put - between ng , if.

<div ng-if="person.getbalance()>0">{{bulk.getbalance()}}</div> 

i think that doesn't work either because you're evaluating method. instead store balance in variable this:

<div ng-if="person.balance>0">{{bulk.balance}}</div> 

execute getbalance method in controller.


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -