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
Have you tried using ng-options instead of creating separate option elements?
<select id="itemsPerPage" name="itemsPerPage" class="panel panel-default" ng-options="item in items track by $index" ng-model="sensorReadingsPerPage" ng-change="changeItemsPerPage()">
And in your controller
$scope.items = [10, 20, 30, 40, 50, 100];
$scope.sensorReadingsPerPage = $scope.items[2];
Try setting $scope.sensorReadingsPerPage = "30"
in your controller.
Note: It should be a string.