我有以下模板:
<div class="row">
<div class="col-sm-3">
<div class="panel panel-primary">
<div class="panel-heading">Services</div>
{{#each}}
<div class="list-group">
{{#link-to 'service' this class="list-group-item"}}
<span class="badge">6</span>
{{dateCreated}}
<small class="text-muted">by {{createdBy}}</small>
{{/link-to}}
</div>
{{/each}}
</div>
{{#link-to 'service' class="btn btn-sm btn-default pull-right"}}New Service{{/link-to}}
</div>
<div class="col-sm-9">{{outlet}}</div>
</div>
当单击其中一个list-group-item
锚点时,.active
类将添加到所有锚标记中,而不是仅添加到我单击的锚标记中。我不确定为什么或如何解决它。