cordova - ng-if validator not working properly -
i'm trying show phrase using ng-if / ng-show (with less or bigger condition) validator not working 100% correct. here's code:
<p style="color: #fff; text-align: center; margin-top: 3px;" ng-hide="coin.cant_coin > '49'" > no enough cash!</p>
here's problem:
it works perfect 50 99 100 , bigger numbers not working. noticed if change value 49 149 works okay 149 999 stop working 50 99. same thing happens ng-show , ng-hide. be? , how can fix this?
i think, problem not validator expression.
what type coin.cant_coin? integer? or string?
if input is: 100 > 49, works. however, if input is: '100' > '49', doesn't work.
i created plunker, shows problem: https://plnkr.co/edit/ojfgd3xqe4yg5dgflxwt?p=preview
<body ng-app="nganimate"> input: 100 > 49 <br> <div ng-hide="100 > 49" > works properly.</div><br> input: '100' > '49'<br> <br> <div ng-hide="'100' > '49'" > error!</div> </body>
Comments
Post a Comment