How to set a preselected option as default in a select field using AngularJS

后端 未结 2 607
死守一世寂寞
死守一世寂寞 2021-01-28 19:16

I am having troubles with setting the default value of a select box in HTML using AngularJS.

Here\'s my scope variable in the controller:

$scope.sensorRe         


        
2条回答
  •  误落风尘
    2021-01-28 19:47

    Try setting $scope.sensorReadingsPerPage = "30" in your controller.

    Note: It should be a string.

提交回复
热议问题