WARNING If you are using ui.bootstrap v0.13.4 or later you probably don't need this
is-open
attribute was added to the ui.bootstrap.popover
in v0.13.4. This repository will no longer be maintaned.
angular-popover-toggle
popoverToggle
directive allowing manual control over AngularUI's popovers
Installation
Download and include the popover-toggle.js
file after AngularJS on your page. You can use Bower:
bower install angular-popover-toggle
Declare a dependency on popoverToggle
in your module:
angular.module('YourModule', ['ui.bootstrap', 'popoverToggle']);
Usage
Now you can use popover-toggle
directive in addition to popover
and popover-template
directives:
<div ng-init="isPopoverOpen = true">
<span popover="Hello World!" popover-toggle="isPopoverOpen">There is a popover above me!</span>
</div>
Example usage with simple popover
:
http://plnkr.co/edit/QeQqqEJAu1dCuDtSvomD?p=preview