css - ng-model can i check its own value? -
i have been playing angular , in pickle. want check see if ng-model value greater 0 apply different css style. can done?
`<span ng-model="users2" ng-hide="!myvar" ng-class="{'test2': users2 > 0}" style="font-size:28px; color:purple" >`
any appreciated? thanks!
you did right
also @ ngclass documentation further examples.
if doesn't work problem.
edit:
i totally on seen mentioned in comments the ngmodel directive binds input, select, textarea (or custom form control) property on scope. on span doesn't , isn't defined
Comments
Post a Comment