Angularjs ng-repeat not working with md-select and md-option -


i have following code use ng-repeat md-select. not working, , drop down shown blank. if use ng-repeat div or html select works. please see below,

angularform:-

<div class="col-xs-12 formclass" ng-controller="dropdowncontroller">   <md-input-container class="formclass">     <label>impacts</label>       <md-select name="impact" id="impact" ng-model="impact">         <md-option  ng-repeat="impact in impacts.availableimpacts" value="{{impact.id}}">{{ impact.name }}         </md-option>       </md-select>   </md-input-container> </div> 

js:-

app.controller('dropdowncontroller', function ($scope) {             $scope.impacts = {     availableimpacts: [                         {id: '1', name: 'name1' },                         { id: '2', name: 'name2' },                         { id: '3', name: 'name3' }                       ],  }; }); 

my angular version old 1 me md-input-container without tag work

<!--<md-input-container>-->      <label>impact</label>        <md-select ng-model="selectedimpact">           <md-option  ng-repeat="impact in impacts.availableimpacts" value="{{impact.name}}">         {{impact.name}}       </md-option>     </md-select> <!--  </md-input-container>--> 

Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -