Milano
Milano

Reputation: 176

how can i keep popover alive while the popover is being hovered for (ngx-bootstrap)?

how can I keep popover alive while the popover is being hovered for ngx-bootstrap/popover angular 2 package?

thanks for your replies

Upvotes: 4

Views: 1125

Answers (2)

Vignesh
Vignesh

Reputation: 1222

You might refer to ngx-popover

    import { PopoverModule } from 'ngx-bootstrap/popover';// or import { PopoverModule } from 'ngx-bootstrap';

@NgModule({
  imports: [PopoverModule.forRoot(),...]
})
export class AppModule(){}

Template

<button type="button" class="btn btn-primary"
        popover="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
  Live demo
</button>

Component

import { Component } from '@angular/core';

@Component({
  selector: 'demo-popover-basic',
  templateUrl: './basic.html'
})
export class DemoPopoverBasicComponent {} 

Upvotes: 1

Francesco Borzi
Francesco Borzi

Reputation: 61954

Tooltip is what you need:

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>

Upvotes: -1

Related Questions