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 '').

jsfiddle


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -