nl_tokens: @ngdoc directive @name ngModel
pl_tokens: function ( ) { return { restrict : 'A' , require : [ 'ngModel' , '^?form' , '^?ngModelOptions' ] , controller : NgModelController , link : { pre : function ( scope , element , attr , ctrls ) { // Pass the ng-model-options to the ng-model controller if ( ctrls [ 2 ] ) { ctrls [ 0 ] . $options = ctrls [ 2 ] . $options ; } // notify others, especially parent forms var modelCtrl = ctrls [ 0 ] , formCtrl = ctrls [ 1 ] || nullFormCtrl ; formCtrl . $addControl ( modelCtrl ) ; scope . $on ( '$destroy' , function ( ) { formCtrl . $removeControl ( modelCtrl ) ; } ) ; } , post : function ( scope , element , attr , ctrls ) { var modelCtrl = ctrls [ 0 ] ; if ( modelCtrl . $options && modelCtrl . $options . updateOn ) { element . on ( modelCtrl . $options . updateOn , function ( ev ) { scope . $apply ( function ( ) { modelCtrl . $$debounceViewValueCommit ( ev && ev . <mask> ) ; } ) ; } ) ; } element . on ( 'blur' , function ( ev ) { scope . $apply ( function ( ) { modelCtrl . $setTouched ( ) ; } ) ; } ) ; } } } ; }