2016-12-03 51 views
0

获得选择项这是我的代码来填充选择列表。如何从MD-选择angularjs

<md-option ng-value="brand.name" ng-repeat="brand in brands">{{ brand.name }}</md-option> 
</md-select> 

我想这个品牌的用户选择在范围上应变量SELECTEDBR以及

可用但它给我的定义。

什么是错上面的代码?

回答

0
<div layout="row"> 
    <md-select class="inline-flex md-select-down" placeholder="Select" ng-model="selectedBrand"> 
     <md-option ng-repeat="item in brands" value="{{item.name}}"> 
     {{item.name}} 
     </md-option> 
    </md-select> 
</div> 

DEMO