ngx-bootstrap: 从关闭手风琴项中排除标题中的元素
ngx-bootstrap: Exclude element in heading from closing an accordion item
有没有办法将 accordion-heading
自定义 HTML 中的某个元素从手风琴的打开和关闭中排除?
例如,
<accordion>
<accordion-group>
<div accordion-heading>
<span>This should close the accordion element (the default behavior)</span>
<span>This should not close it</span>
</div>
</accordion-group>
</accordion>
我用
修复了它
<span (click)="$event.stopPropagation()">This should not close it</span>
希望有一天能帮到别人!
有没有办法将 accordion-heading
自定义 HTML 中的某个元素从手风琴的打开和关闭中排除?
例如,
<accordion>
<accordion-group>
<div accordion-heading>
<span>This should close the accordion element (the default behavior)</span>
<span>This should not close it</span>
</div>
</accordion-group>
</accordion>
我用
修复了它<span (click)="$event.stopPropagation()">This should not close it</span>
希望有一天能帮到别人!