To populate an array with values selected from a dropdown, you can use the following approach:
$scope.selectedValues = [{
}]
$scope.print = function() {
$scope.selectedValues.push($scope.model);
}
<div>{{selectedValues}}</div>
When displaying the array in the frontend, you might see unnecessary characters like [{},"01","02"]
. To show only the values without extra characters.