【发布时间】:2017-05-06 00:36:18
【问题描述】:
我有一个页面,其中包含一些我希望能够标记的输入框
<div class="form-group">
<label class="d-block">Allowance Type</label>
<div class="input-group">
<input type="text" class="form-control width-150" [(ngModel)]="selectedPricingItem.allowanceTypeDescription" readonly>
<span class="input-group-addon mg-batch-flag" (click)="flagItem('allowanceTypeDescription','Allowance Type')" data-toggle="modal" data-target="#auditDialog">
<i class="fa fa-fw fa-flag" aria-hidden="true">
</i>
</span>
</div>
</div>
我在页面上有几次这种结构,我希望能够基于我拥有的单击事件处理程序为它们创建一个引导类(有危险)。在那个处理程序中,我只是填充了一个我打算在此时提交到 Web 服务的类的实例。创建具有不同样式的组件并使用 *ngIf 隐藏/显示的最佳方法是什么?
【问题讨论】:
标签: css twitter-bootstrap angular