MCPcopy Create free account
hub / github.com/binux/qiandao / ngModelDirective

Function ngModelDirective

web/static/components/angularjs/angular.js:17803–17820  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17801 * </example>
17802 */
17803var 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/**

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected