フォームに起因するカスタム検証ディレクティブがあります
<form myValidations>
app.directive('myValidations', function(){
return{
//require: 'ngModel', note its commented out
link: function(s,e,a,ctrl){//note the emphasis on the ctrl
}
}
});
'require:ngModel'がない場合、このctrl。$parsersをどのようにグリップしますか。
要素を見つけて、そのng-modelを関数で呼び出してng-model-controllerを返すことはできますか?そこから#$ parsersを実行できるようにしますか?