ami
1
Hi! I am using ionic $popup and adding buttons in it by following code :
$ionicPopup.show({
template: ‘’,
title: ‘Pick a color’,
scope: $scope,
buttons: [
{
text: ‘red’,
onTap: function(e) {
console.log(‘awesome’);
return ‘awesome’; }
}
]
})
How can I add background colour to these buttons?
Check this codepen: http://codepen.io/soutlink/pen/emROYW
You must Add cssClass to popup and type to the button
Then in css, overwrite styles
You also can do your own custom “types” not only ionic button types
EDIT:
You do not need cssClass. Only “type” in button, and then do your own style. I updated codepen
1 Like