form.FormController.$removeControl()

$removeControl(control);

Deregister a control from the form.

Input elements using ngModelController do this automatically when they are destroyed.

Note that only the removed control's validation state ($errorsetc.) will be removed from the form. $dirty, $submitted states will not be changed, because the expected behavior can be different from case to case. For example, removing the only $dirty control from a form may or may not mean that the form is still $dirty.

Parameters

Param Type Details
control object

control object, either a form.FormController or an ngModel.NgModelController

doc_AngularJS
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.