app.component.ts
import { Component } from '@angular/core';
import { NgbPopover } from '@ng-bootstrap/ng-bootstrap';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
onClick(popover:NgbPopover){
if (popover.isOpen()) {
popover.close();
} else {
popover.open();
}
}
}
app.component.html
<h4 style="padding-top:25px; padding-bottom:40px;">
Angular Bootstrap - Popover manual triggers
</h4>
<button
#pop="ngbPopover"
placement="end-top"
triggers="manual"
[autoClose]="false"
(click)="onClick(pop)"
ngbPopover="Lorem ipsum dolor sit amet,
consectetur adipiscing elit.
Vivamus eget sodales justo.
Donec eu condimentum nibh, eu congue mi.
Phasellus malesuada ipsum sit amet faucibus placerat."
popoverTitle="Popover Manual Triggers">
{{pop.isOpen()? 'Close Popover' : 'Open popover'}}
</button>
- angular bootstrap - Popover with HTML content
- angular bootstrap - How to delay Popover open close
- angular bootstrap - Popover custom CSS class
- angular bootstrap - Popover shown & hidden event
- angular bootstrap - Timepicker with meridian
- angular bootstrap - Timepicker without spinner
- angular bootstrap - Timepicker custom steps
- angular bootstrap - Datepicker navigate to current month
- angular bootstrap - Datepicker navigate to specific year month
- angular bootstrap - Datepicker navigate select specific date
- angular bootstrap - Datepicker default selected date
- angular bootstrap - Datepicker default visible year month
- angular bootstrap - How to show Datepicker in a popup
- angular bootstrap - How to enable disable Datepicker
- angular bootstrap - Datepicker custom day style