Are multiple popovers on the same page supported? If I create 2 popovers, I can see only the first. If I comment out the first, I can see only the second. But both do not seem to be able to coexist. Somewhere else I read that it is a singleton service but don’t see that on the docs pages.
I am using popovers to make dropdown-like menu. One menu provides options that are application-wide (logout, about us, preferences, etc.) The second menu is context sensitive. The two menus are made and handled in two different controllers. Is there a better way to do this in ionic?
There can be multiple popover on the same page. When you open the popover you call
popover.show($event);
The popover service uses the $event to get current coordinates of the element. So… an idea would be to use the same $event to open two different popovers BUT using classes with !important to change the position that was set inline.
Hi all,
I had this problem too, i solved it by defining a click event for each of the objects with a popover then only showing the popover once the template has finished loading…like this:
//only show after template has loaded
$scope.popover.show($event);
});
$scope.closePopover = function() {
$scope.popover.hide();
};
//Cleanup the popover when we're done with it!
$scope.$on('$destroy', function() {
$scope.popover.remove();//remember to remove this
});
};