I am experiencing a really strange error. I have a checkbox in my view whose has a directive to show the value of it when it changes. In FF it works well showing the right values. But in other browsers, like Chrome, it shows the the opposite response, i.e., if is checked, should show 'true', but shows 'false'!
In my view:
<input type="checkbox" id="accept" name="accept" ng-model="accept" d6 />
My directive:
validation.directive('d6', ['$parse', function($parse){
return {
require: 'ngModel',
restrict: 'A',
link: function link(scope, elem, attrs, control) {
elem.on('change', function(){
console.log(control.$modelValue);
});
}
}
}]);
