How do you clear form inputs when a model changes in AngularJS? -
i have form has common inputs , inputs specific model 'type'. when user selects 'type', select dropdown, these specific fields change. i'm using ng-include include specific 'partial' based on model.type. in 'edit' mode, how can reset these specific inputs when model 'type' changes?
use ng-change
property on select
.
then tie function clears models bound form inputs (e.g. sets ''
).
Comments
Post a Comment