Search code examples
javascriptangularjsionic-frameworkionic-popup

Ionic: How is it possible to change $ionicPopup subTitle's text programmatically?


I'm trying to change the value as well as the style of the subText attribute associated with an $ionicPopup somewhere in my app.

I searched everywhere, but didn't find yet any method for doing so.

So how is that possible?

Thanks.


Solution

  • If you want to change popup after it been shown, you can use selectors and angular jqlite wrapper.

    Code is like this

    onTap: function(e) {
              var result = document.getElementsByClassName("popup-sub-title");
    
               angular.element(result).html('dsaadsds')
               e.preventDefault();
            }
    

    You have here a working codepen.