()
| 17801 | * </example> |
| 17802 | */ |
| 17803 | var ngModelDirective = function() { |
| 17804 | return { |
| 17805 | require: ['ngModel', '^?form'], |
| 17806 | controller: NgModelController, |
| 17807 | link: function(scope, element, attr, ctrls) { |
| 17808 | // notify others, especially parent forms |
| 17809 | |
| 17810 | var modelCtrl = ctrls[0], |
| 17811 | formCtrl = ctrls[1] || nullFormCtrl; |
| 17812 | |
| 17813 | formCtrl.$addControl(modelCtrl); |
| 17814 | |
| 17815 | scope.$on('$destroy', function() { |
| 17816 | formCtrl.$removeControl(modelCtrl); |
| 17817 | }); |
| 17818 | } |
| 17819 | }; |
| 17820 | }; |
| 17821 | |
| 17822 | |
| 17823 | /** |
nothing calls this directly
no outgoing calls
no test coverage detected