angular - 使用 Angular 供电的 Bootstrap 的单选按钮衣柜故障
问题描述
根据示例放置 Angular 驱动的 Bootstrap 单选按钮时,按钮看起来没问题。但是如果具有btn-group-toggle类的元素不是直接父元素,按钮会突然显示单选按钮乳头,如下图所示。如何在嵌套元素中布局非哺乳动物单选按钮?
html模板:
<table class="table">
<tr class="btn-group btn-group-toggle" ngbRadioGroup>
<th>Numbers</th>
<th *ngFor="let month of [1,2,3,4]">
<label ngbButtonLabel class="btn btn-primary">
<input ngbButton type="radio" [value]="month" />{{month}}
</label>
</th>
</tr>
</table>
<div class="btn-group btn-group-toggle" ngbRadioGroup>
<label ngbButtonLabel class="btn btn-primary" *ngFor="let month of [1,2,3,4]">
<input ngbButton type="radio" [value]="month" />{{month}}
</label>
</div>
解决方案
推荐阅读
- sql - 如何使用 xml 标记和标记 ID Oracle 从 CLOB 列中获取值
- r - 使用 SimFin 数据进行资产负债表分析
- powerapps - 在 PowerApps 中,有没有办法在单选按钮过滤器中添加“显示所有记录”选项?
- c++ - C++:向量值在退出 if 语句后重置
- android - Wear OS:真实设备上的动画要慢得多
- java - 父类 Java 中的对象未更改
- r - 均匀抽取 3D 表面网格并保持双边对称
- wordpress - 我能做些什么来解决moodle+wordpress同步问题?
- python - 当我在pygame中的不同动画之间切换时精灵闪烁
- sql - 如何有效地在关系数据库中存储项目的标签?