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

后端 未结 7 1412
臣服心动
臣服心动 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条回答
  •  猫巷女王i
    2020-12-07 12:47

    I use the documented approach.

    https://docs.angularjs.org/guide/forms

    so, user the form name, on "save" click for example just pass the formName as a parameter and hey presto form available in save method (where formScopeObject is greated based upon the ng-models specifications you set in your form OR if you are editing this would be the object storing the item being edited i.e. a user account)

    Name

提交回复
热议问题