var myPopup = $ionicPopup.show({
template: '<p>What's the state of the order?</p><br/>'
+ '<button class="button button-full button-positive" ng-click="sendOrder()">Finished</button>'
+ '<button class="button button-full button-positive" ng-click="sendOrder()">In Progress</button>',
title: '<b>Send order</b>',
scope: $scope,
buttons: [
{
text: 'Cancel'
}]
});
(I have done the buttons in the template so I could have 1 button per line)
This works perfectly, but with the ‘custom’ buttons in the template the popup is not closing when clicking on them. Is there a way to close the popup with the sendOrder() function? Or some event that is called when a button is pressed?
Yes sorry about the ', I quickly translated it to English for this example, but in my own language the ’ isn’t there .
I found out about the close() function, thanks about that. Only problem I have now: after closing the popup I immediately open another Ionic Popup (the alert). That works, but then I don’t have the transparant grey background anymore in any of my popups.