ngChange-like functionality for the entire form

后端 未结 4 2038
余生分开走
余生分开走 2020-12-05 04:21

I would like to do an equivalent of ng-change for the entire form whenever there is a change in one of its input fields.

I know that since AngularJS 1.3

4条回答
  •  [愿得一人]
    2020-12-05 04:54

    okay, super super late answer ... but this works pretty neat

    // html
    
    ...
    // controller function $postLink() { ctrl.form.$$element.on('change', function () { console.log('fired'); }); }

提交回复
热议问题