【发布时间】:2018-02-16 23:31:33
【问题描述】:
<template #popDefinitionsTemplate>
<h4>{{definitions.title}}</h4>
<i class="fa fa-times"></i>
<hr>
<div [innerHtml]="getDefinitionsPopoverContent()"></div>
</template>
<button class="btn btn-secondary btn-finish-later pull-right"
[popover]="popDefinitionsTemplate"
placement="bottom">
<i class="fa fa-info-circle"></i>
</button>
我有这段代码用于在我的页面中显示弹出框。我想在标题旁边的关闭按钮上包含一个手动隐藏,如下所示:
<i class="fa fa-times" (click)="popover.hide()"></i>
我不太确定如何实现这个。
请注意,这是来自https://valor-software.com/ngx-bootstrap/#/popover#popover-config
【问题讨论】:
-
不要在标题中加上“已解决”。为您的问题添加答案并接受该答案
-
您能否将解决方案移至答案?对于将来遇到此问题的人来说,更容易找到。见:stackoverflow.com/help/self-answer
-
感谢@MatthiasMeid。现在就做。 :D
-
...并且不要忘记接受@a_horse_with_no_name 建议的答案。 ;)
-
我必须等待 2 天(发布问题后)才能接受它作为答案:|
标签: angular popover bootstrap-popover