Custom alert popup from template


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.



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.


And how to call from anywhere on the app ?


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