In the Angular documentation in the ngModelController example, the javascript file says:
angular.module('customControl', []).
directive('contenteditable', function() {
return {
restrict: 'A', // only activate on element attribute
require: '?ngModel', // get a hold of NgModelController
...
Why does "ngModel" refers to the NgModelController? Why isn't it, "require: '?ngModelController" That seems more appropriate from a naming perspective.
Also, what's the difference between using the $setViewValue() function to update the model as opposed to using the $watch() function to watch for changes on the model inside the scope of the directive?
Thanks!