Input value doesn't display. How is that possible?

后端 未结 13 2303
后悔当初
后悔当初 2021-02-04 23:54

This must be something utterly stupid that I\'ve done or am doing, but I have an input with a value attribute that simply isn\'t being displayed:

13条回答
  •  没有蜡笔的小新
    2021-02-05 00:26

    Mine was related to AngularJS

    I was trying to put both an HTML Value and an ng-Model, thinking that the ng-Model would default to the Value, because I was too lazy to add the Model to the $scope in the Controller...

    So the answer was to assign that default value to the $scope.variable in the controller.

提交回复
热议问题