Simple AngularJS Form is undefined in Scope

前端 未结 7 1819
独厮守ぢ
独厮守ぢ 2020-12-13 03:33

I\'m starting to play around with AngularJS forms in jsfiddle and I\'ve come across a problem already where a very simple form example is not working as expected. All I have

7条回答
  •  -上瘾入骨i
    2020-12-13 04:19

    You can re-initialize the form from your controller before you try to access $scope.form with this line of code. $scope.form will then be available.

    angular.element(jQuery('.form-control')).triggerHandler('input')
    

提交回复
热议问题