Goo*_*ans 2 frontend ngx-bootstrap angular
我正在尝试使用 ngx-bootstrap 在弹出框的右上角制作一个手动弹出框关闭按钮。我知道要添加 x 按钮,我们必须使用 bootstrap 中的 &Times。
https://v4-alpha.getbootstrap.com/utilities/close-icon/
但是我不知道如何将它实现到我的标题中,因为我试图将它添加到右上角。
content: string = "content of popover ";
Title: string = "Title of popover";Run Code Online (Sandbox Code Playgroud)
<a [popover]="content" container="body" placement="top" [popoverTitle]="Title" >Making this popover</a>
Run Code Online (Sandbox Code Playgroud)
这是我正在使用的链接。我正在使用这个例子,模板和组件。
我的plunker基本上,简单地说,我需要标题右上角的X。
最终设法做到这一点,因为 popoverTitle 只接受字符串
<div>
<ng-template #popoverContent3>
<div style="font-size:18px; font-family:'Times New Roman'; font-weight:bold;">
<p>this is a title...
<button type="button" (click)='pop2.hide()' class="close" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</p>
</div>
<div>
<p>The best looking pop over, with a TITLE!</p>
</div>
</ng-template>
<a [popover]="popoverContent3" #pop2="bs-popover" placement="right">
Pop over with title and a x button!
</a>
</div>Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3692 次 |
| 最近记录: |