当popover正在为(ngx-bootstrap)徘徊时,我怎么能保持popover活着?

时间:2017-11-20 10:00:42

标签: angular ngx-bootstrap

如果在ngx-bootstrap / popover angular 2包中悬停popover,我怎么能保持popover活着?

感谢您的回复

2 个答案:

答案 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>