gpt4 book ai didi

angularjs - 禁用单选按钮组angularjs

转载 作者:行者123 更新时间:2023-12-02 08:17:25 24 4
gpt4 key购买 nike

我想在静态 html 页面中使用 angularjs 禁用单选按钮组。我正在使用 angularjs Material 设计。这是我的代码

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

最佳答案

终于明白了,只需为每个md-radio-button添加ng-disabled="true"

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

关于angularjs - 禁用单选按钮组angularjs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40690115/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com