我想在静态html页面中使用angularjs禁用单选按钮组。我正在使用angularjs材质设计。 这是我的代码
<md-input-container>
<label>Air Conditioned</label>
<md-radio-group ng-model="master.airConditioned" name="airConditioned" required ng-disabled="true" class="mdradio radioAlign" layout="row">
<md-radio-button value="true" class="md-primary"> Yes </md-radio-button>
<md-radio-button value="false"> No </md-radio-button>
</md-radio-group>
</md-input-container>
答案 0 :(得分:4)
最后我明白了,只需为每个ng-disabled="true"
md-radio-button
<md-radio-group ng-model="master.airConditioned" name="airConditioned" required class="mdradio radioAlign" layout="row">
<md-radio-button value="true" class="md-primary" ng-disabled="true"> Yes </md-radio-button>
<md-radio-button value="false" ng-disabled="true"> No </md-radio-button>
</md-radio-group>