あなたのフィドルを作業コードで更新しました。ディレクティブで ngModel を必要とし、その $modelValue を監視する場合、探している動作を取得できます。
HTML:
<div switch ng-model="testObject.switch">
指令:
booleanSwitchModule.directive('switch', [function () {
return {
scope: {},
require: "?^ngModel",
link: function (scope, elem, attr, ngModel) {
var timesChanged = 0;
scope.$watch(function() {return ngModel.$modelValue; }, function (val) {
if (val != undefined) {
alert("model changed " + ++timesChanged + " times");
scope.switchPosition = scope.model;
}
});
},
restrict: 'EA',
replace: true,
transclude: true,
template: '<label class="switch">' +
'directive scope model: {{ngModel}}' +
'<span ng-transclude></span>' +
'</label>',
}
}]);
更新されたフィドルは次のとおりです: https://jsfiddle.net/62911kx5/3/