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.
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.
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.
You cannot change the subTitle
directly using the configuration option, as by defined in the specification it accepts an optional String
value
{
title: '', // String. The title of the popup.
cssClass: '', // String, The custom CSS class name
subTitle: '', // String (optional). The sub-title of the popup.
}
UPDATE:
You can assign a value to a $scope
property within onTap
to assign a success message
{
text: '<b>Save</b>',
type: 'button-positive',
onTap: function(e) {
$scope.success = {
message: 'Hello World!'
};
e.preventDefault();
}
}
And now you can access $scope.success.message
to show the success message