AngularJs can't access form object in controller ($scope)

后端 未结 7 1397
臣服心动
臣服心动 2020-12-07 12:25

I am using bootstrap-ui more specifically modal windows. And I have a form in a modal, what I want is to instantiate form validation object. So basically I am doing this:

7条回答
  •  轮回少年
    2020-12-07 12:52

    For those using Angular 1.5, my solution was $watching the form on the $postlink stage:

    $postLink() {
          this.$scope.$watch(() => this.$scope.form.$valid, () => {
          });
        }
    

提交回复
热议问题