How to get the value of a field with ng-change

后端 未结 3 2081
遇见更好的自我
遇见更好的自我 2021-01-04 09:49

I know how to react to user input in a textarea with ng-change in AngularJS. But how can I get the current input inside the Angular controller? I am missing something like <

3条回答
  •  梦谈多话
    2021-01-04 10:31

    ng-model

    It'll store the value of an input, textarea, or select.

    Your html should be like this:

    Then in your controller you can reference that with $scope.myValue

    Hope that helps! :)

提交回复
热议问题