在角度材质md-select中删除$$ hashKey

时间:2016-04-28 09:15:23

标签: javascript angularjs meteor angular-material

我有一个数组对象:

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"
}

我哪里错了?

0 个答案:

没有答案