How to do validation in $ionicPopup?
If you give ionicpopup
a templateUrl
, instead of hard coded template string, you can use a regular controller inside the template that does the validation.
I deleted all the ionicpopup
related buttons and placed the necessary buttons inside the template.
In this way I was able to control the ionicpopup
's state from the controller (i.e. closing the popup).