1

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.

Yogesh Nikam
  • 633
  • 5
  • 20

2 Answers2

2

You can add cssClass to the $ionicPopup.show method:

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

and this class will appear in the generated html as shown here: **enter image description here**

Ritesh Jagga
  • 1,387
  • 1
  • 11
  • 23
1

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.

Yogesh Nikam
  • 633
  • 5
  • 20