http://plnkr.co/edit/RP9SpO1qGjn5Ua6pZJ3D?p=preview
js
angular.module(\"sampleapp\", []).controller(\'samplecontroller\', function($scope,$rootScope)
The ng-change directive requires the ng-model directive to be present.
From the Docs:
ngChange
Note, this directive requires
ngModelto be present.— AngularJS ng-change Directive API Reference
ng-model and ng-checked directives should not be used togetherFrom the Docs:
ngChecked
Sets the checked attribute on the element, if the expression inside
ngCheckedis truthy.Note that this directive should not be used together with
ngModel, as this can lead to unexpected behavior.— AngularJS ng-checked Directive API Reference
Instead set the desired initial value from the controller.
For more information, see