我有一个数组对象:
timezone = [{ id:1,value: "UTC+12"},
{ id:2,"value": "UTC+13"},
{ id:3,"value": "UTC+14"}]
在HTML中:
<md-select name="timezone" ng-model="$ctrl.time" ng-model-options="{trackBy: '$value.id'}">
<md-option ng-repeat="time in $ctrl.timezone track by $index" ng-value="time">{{time.value}}</md-option>
</md-select>
但是当我console.log($scope.time)
我得到
{
$$hashKey:"object:197",
id: 1,
value: "UTC+12"
}
我哪里错了?