I am using angular.js for font-end and node.js for server side.
Now, I am having some list of values(months) in array randomly.
HTML code :
<div ng-app="">
<div ng-controller="Ctrl">
<select ng-model="month">
<option ng-repeat="month in months">{{month.value}}</option>
</select>
</div>
</div>
Controller code :
function Ctrl($scope) {
$scope.months = [{"value":"February"},{"value":"April"},{"value":"January"}];
$scope.month=null;
}
Expected output:
January
February
April
I want in the above order of month in drop-down