why require option does not throw error in my directive when i use ngModel as require option
The below script is working
angular.module('myApp').directive('validNumber',[function(){
return{
require:'ngModel',
scope:{},
link: function (scope ,element, attr, ngModel) {
}
}}]) //here is my html <input ng-model="data" valid-number>
the below script is not working why? it throws compile error Missing Required Controller
angular.module('myApp').directive('validNumber',[function(){
return{
require:'ngSandy',
scope:{},
link: function (scope ,element, attr, ngModel) {
}
}}]) //here is my html <input ng-sandy="data" valid-number>