8

This is my angular code I want to set default value as 300mb

<label >RAM</label>
  <md-select ng-model="RAMVal">
    <md-option value="300mb" ng-selected="index == 1">300mb</md-option>
    <md-option value="400mb">400mb</md-option>
  </md-select>
Lakmi
  • 1,379
  • 3
  • 16
  • 27

2 Answers2

17

Just add this

 ng-selected="true"

you can check in https://jsfiddle.net/rschmukler/0ju750xo/

Levent Saatci
  • 404
  • 3
  • 4
0

Just set ngModel(RAMVal) value to whichever option you want to be selected by default. ex : $scope.RAMVal = '300mb'; Reference Link : mdSelect

Sud
  • 97
  • 1
  • 1
  • 5