I have a select box to which I have applied angular-chosen. Below is the full HTML
<body ng-app="myApp">
<div ng-controller="mainController">
<div ng-init="init()">
<select id="selectid1" name="selectid1" ng-model="angularselect" chosen>
<option value=""></option>
<option ng-repeat="report in reportValuesOptions" value="{{report['value']}}">{{report['name']}}</option>
</select> Value : {{angularselect}}
</div>
<input type="button" ng-click="addreport()" value="Add Report" />
</div>
</body>
The select box is getting populated from an array in controller scope $scope.reportValuesOptions = [];
There is a init function which is called on div load to set default values in select box
$scope.init = function()
{
$scope.reportValuesOptions.length = 0;
$scope.reportValuesOptions.push({'name':'Previous day compasite','value':'previousdaycomposite'});
$scope.reportValuesOptions.push({'name':'ACH Customer Activity','value':'achcustomeractivity'});
}
There is a button in HTML which calls the addReport function when clicked to add values in array $scope.reportValuesOptions
But on clicking this button, values added to array, are not reflected in select box. Those values should also be available to select box as its option