How do a programatically add class to $ionicPopup so I have style it?


#1

I have several controllers that all make use of $ionicPopup

I need to be able to add a different class to the popup in each controller so I am able to style it accordingly.

How do I do this? I see that ng-class=“cssClass” on popup template. Can I use that?


#2

Does cssClass option work?

http://ionicframework.com/docs/api/service/$ionicPopup/


#3

Yes, ended up trying that.

 var confirmPopup = $ionicPopup.confirm({
                title: 'Delete My Place',
                template: 'Are you sure you want to delete the place ' + item.name + '?',
                cssClass: 'places' // this was the solve
            });