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.
Asked
Active
Viewed 585 times
1
-
I am also facing same issue. – Pramod Kharade Jul 13 '16 at 08:47
-
try with ng-class. – the_mahasagar Jul 13 '16 at 16:29
-
how ?its work for you. @the_mahasagar – Yogesh Nikam Jul 15 '16 at 09:08
2 Answers
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:

Ritesh Jagga
- 1,387
- 1
- 11
- 23
-
-
You must be having a css file for your project, there you add this class `.myPopup .popup { background-color: red }`. – Ritesh Jagga Jul 15 '16 at 09:27
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