如果在ngx-bootstrap / popover angular 2包中悬停popover,我怎么能保持popover活着?
感谢您的回复
答案 0 :(得分:2)
您可以参考ngx-popover
import { PopoverModule } from 'ngx-bootstrap/popover';// or import { PopoverModule } from 'ngx-bootstrap';
@NgModule({
imports: [PopoverModule.forRoot(),...]
})
export class AppModule(){}
<强>模板强>
<button type="button" class="btn btn-primary"
popover="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
Live demo
</button>
<强>组件强>
import { Component } from '@angular/core';
@Component({
selector: 'demo-popover-basic',
templateUrl: './basic.html'
})
export class DemoPopoverBasicComponent {}
答案 1 :(得分:0)
工具提示:
https://valor-software.com/ngx-bootstrap/#/tooltip
<button
class="btn btn-primary"
type="button"
tooltip="This text will be shown when the button is hovered">
Hover me!
</button>