I created this popup using
$ionicPopup.show({
title: 'Choose Location...',
buttons:[
{
text: "Current Location",
type: 'button-positive',
onTap: function(){
$scope.myLocation();
}
},
{
text: "Previous Locations",
type: 'button-positive',
onTap: function(){
$state.go('menu.listSelect');
}
},
{
text: "Address Book",
type: 'button-positive',
onTap: function(){
}
},
{
text: "Cancel",
type: 'button-positive',
onTap: function(){
console.log('cleek');
$scope.fillOptionPopup.close();
}
},
]
});
};
This puts the buttons created next to each other, so

Is there a way to make the buttons so that they stretch across the width of the pop-up window, and each button is on a new line using this button creation format for pop-up windows?
I used this code instead of an array of buttons, and it gives me this what I want. But it ng-clickdoes not call the functions that I made from ontap from the array.

template: '<button class="button button-positive" ng-mousedown="goMyLocation()">Current Location</button><br>'+
'<button class="button button-positive" ng-mousedown="goMenuList()">Previous Locations</button><br>'+
'<button class="button button-positive" ng-mousedown="goAddressBook()">Address Book</button><br>'+
'<button class="button button-positive" ng-mousedown="closePopup()">Close</button>'
Is there a way to make the buttons be one per line and the full width of the popup?
source
share