Hi everyone!
I’m using a simple popover method here’s the code:
$scope.popover = $ionicPopover.fromTemplateUrl('templates/popover/config-header.html', {
scope: $scope
}).then(function (popover) {
$scope.popover = popover;
});
$scope.openPopover = function ($event) {
$scope.popover.show($event);
};
$scope.closePopover = function () {
$scope.popover.hide();
};
/* $scope.logout = function(){
$state.go('app.login');
};*/
//Cleanup the popover when we're done with it!
$scope.$on('$destroy', function () {
$scope.popover.remove();
});
// Execute action on hide popover
$scope.$on('popover.hidden', function () {
// Execute action
});
// Execute action on remove popover
$scope.$on('popover.removed', function () {
// Execute action
});
but I got a weird error: Cannot call popover.show() after remove(). Please create a new popover instance.
I say weird because I didn’t find something similar so far (here or on google)
Anyone had this problem?
Thanks!