Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 AngularJS 中设置输入文本框的默认值,以便以后可以更改?我希望能够将文本框的更改值(使用 ng-model)提交到服务器。在这种情况下,使用 ng-value 设置文本框的初始值是正确的方法吗?
设置ngModel值:
ngModel
<input type="text" ng-model="myInput" /> $scope.myInput = "Default";