Custom alert popup from template


#1

I have a popup template that use with $ionicPopup i need to call this from anywhere on app, and change the data with parameters, example:

If warning:
Show a warning icon, some text and one button
If error:
Show different icon, and diferent text, and two buttons

and so …

The really issue are past the parameters and call from anywhere.

Thanks


#2

Hey there :smile:
Use templateUrl e.g templateUrl:‘popup.html’. And in popup.html create the scenarios what you want on different condition and use ng-show/ng-hide to what you want on specific condition.


#3

And how to call from anywhere on the app ?


#4

I use templateUrl but not ok.
It don’t accept file *.html in templateUrl