为什么 $scope.watch 不能与“模型”一起使用? http://jsfiddle.net/lesouthern/8PUtP/5/
.directive('testDirective',function() {
return {
restrict : 'A',
scope : {
model : '=ngModel'
},
link : function($scope,$element,$attrs) {
$scope.$watch('model',function(x) {
console.log('this is model: ' + x);
});
}
}
});