I'm trying to use $ionicPopup to handle login/registration on my app.
I'm opening it from a service, so I created a new scope and attached it to the ionicPopup.
It looks smth like this:
<form name="loginForm" novalidate>
onTap: ( e ) ->
form = $scope.loginForm #why is it undefined?
I figured out an ugly, but working solution that I'm currently using. 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.
Right now I deleted all the ionicpopup related buttons (I found them really awkward anyway), and give the necessary buttons inside the template.
And in this way I can control the ionicpopup's state from the controller (for example closing the popup)
Tomorrow I create a jsFiddle example, in case any one is interested.
But if you have any better solution, please share :D