Currently, it appears that there are two ways to hook into the opening of a popover.
Use the ns-popover-angular-event, which will open the popover when the given event name is broadcasted on the $rootScope. You can listen to that event elsewhere and know that when it is called, the popover was also told to display.
Use the ns-popover-scope-event, which will open the popover when the given event name is broadcasted on the $scope. As with angular-event, you can listen for that event and respond accordingly.
The problem with the two approaches above is that sometimes there are many popovers on the same scope, so unless you are using group ids, you may be triggering numerous popovers to display when you had only wanted to open one.
To remedy this, both ns-popover-angular-event and ns-popover-scope-event should parse the passed in values, so that you could bind to an event such as some:event:{{ some.id }}.
I found that this was a level of complexity that was beyond what I was looking to do.
Really, I just wanted to run callback methods when the associated popover was either opened or closed.
These proposed changes introduce the following attributes:
Currently, it appears that there are two ways to hook into the opening of a popover.
ns-popover-angular-event
, which will open the popover when the given event name is broadcasted on the$rootScope
. You can listen to that event elsewhere and know that when it is called, the popover was also told to display.ns-popover-scope-event
, which will open the popover when the given event name is broadcasted on the$scope
. As withangular-event
, you can listen for that event and respond accordingly.The problem with the two approaches above is that sometimes there are many popovers on the same scope, so unless you are using group ids, you may be triggering numerous popovers to display when you had only wanted to open one.
To remedy this, both
ns-popover-angular-event
andns-popover-scope-event
should parse the passed in values, so that you could bind to an event such assome:event:{{ some.id }}
.I found that this was a level of complexity that was beyond what I was looking to do.
Really, I just wanted to run callback methods when the associated popover was either opened or closed.
These proposed changes introduce the following attributes:
The callbacks will be executed when the respective popover's
displayer_.display
orhider_.hide
methods are called.