yogi yogi - 4 months ago 71
Android Question

How to Modify ionic popup background at run time

I created a custom popup in ionic if I change the background color of popup class from CSS background color of all other popups is changed. I want to change the background color of only my custom popup.

Answer

i was created custom CSS for my popup in show method like

$ionicPopup.show({
  template: '',
  title: '',
  subTitle: '',
  cssClass: 'myPopup',
  scope: $scope,
  ...

And My Custom CSS is as follows

.myPopup .popup{
    //write your code here
} 

.myPopup .popup-body{
    // Write your css here
}

this was worked for me.