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
Post a Comment