My code is like this
<body ng-app="myApp" ng-controller="MainCtrl">
<select data-ng-model="myclass" data-ng-options="color.name for color in colors">
<option value="">-- Select Freight Class --</option>
</select>
</body>
angular.module('myApp', []).controller('MainCtrl', [
'$http', '$scope', '$filter', function ($http, $scope, $filter) {
$scope.myclass = {
"name": "65"
};
$scope.colors = [{
name: '50'
}, {
name: '55'
}, {
name: '105'
}, {
name: '110'
}, {
name: '400'
}, {
name: '500'
}];
}]);
as you can see I am trying to set default selected value of this select as 65
but its not working. Can any one tell me how to achieve this?
http://jsfiddle.net/d8kg0uys/