title: How to do validation in $ionicPopup?
body: <p>I'm trying to use <code>$ionicPopup</code> 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.</p>
  
  <p>It looks something like this:</p>
  
  <pre><code>$ionicPopup.show
    template: '''
      &lt;form name="loginForm" novalidate&gt;
        ...
      &lt;/form&gt;
    ''',
    scope: $scope,
    buttons: [
      { 
        text: 'Cancel',
      },
      {
        text: '&lt;b&gt;Save&lt;/b&gt;',
        type: 'button-positive',
        onTap: ( e ) -&gt;
  
          form = $scope.loginForm #why is it undefined?
      } 
    ]
  </code></pre>
  
  <p>So I named the form as <code>loginForm</code>, and I want to access it inside the <code>onTap</code> function to handle validation. But the <code>loginForm</code> does not exists on the <code>$scope</code>, like it would in a normal form validation inside a controller.</p>
  
  <p>How should I handle the validation here?</p>