angularjs - unusual behaviour of ng-checked / checkbox -



angularjs - unusual behaviour of ng-checked / checkbox -

<input class="ml1" type="checkbox" ng-checked="item.ph_comp_change" ng-model="item.ph_comp_change" ng-true-value="1" ng-false-value="0" />

this makes input checkbox, problem need uncheck 2 times, in order remove check sign it. if remove ng-true-value="1" ng-false-value="0" , works fine.

working jsfiddle http://jsfiddle.net/u3pvm/14616/

please help me out here

you need set status on ng-checked

ng-checked="item.ph_comp_change === 1"

it work.

angularjs checkbox

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -