问题描述
我已经生成了使用mat幻灯片切换器的for循环列表,但是想要的是,当我单击一个幻灯片切换器时,应该禁用其他幻灯片切换器。
我的代码:
HTML:
<div class="row">
<div class="col-md-6 mt-2" *ngFor="let data of attributes">
<mat-slide-toggle>{{data}}</mat-slide-toggle>
</div>
</div>
TS:
attributes = ["Last 7 days","Last 30 days","Last 60 days"]
在这种情况下,当我单击“过去7天”幻灯片切换时,应禁用“过去30天”,“过去60天”,
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)