In my last article we discuss on how to use accordion in angular application. In these tutorial i discuss on how to use popover in Angular application.
First we need to add below line in our app.module.ts file.
...............
import { PopoverModule } from 'ngx-bootstrap';
............
@NgModule({
............
imports: [
PopoverModule.forRoot(),
...
]
})
After adding above lines in app.module.ts file we can use these in any component.
Basic example for the popover
Default popover use top position to display. you can specify the position like ‘top’,’left’,’right’,’bottom’ need to pass as input in the html like below example.
If you want to pass Popover Title then pass value in “popoverTitle” like below Example.
You can Close on Next click using Focus trigger. You need to add ‘ triggers=”focus” ‘in tag. like below example.