title: Form validation popup window message works only if change is made in Angularjs
body: <p>I have a form which need to show validation error popup window message if clicked submit.
  Here is my form.</p>
  
  <pre><code> &lt;form ng-submit="register(user)"&gt;
  &lt;div class="list"&gt;
    &lt;label class="item item-input"&gt;
      &lt;input type="text" placeholder="First Name" ng-model="user.first" &gt;
    &lt;/label&gt;
    &lt;label class="item item-input"&gt;
      &lt;input type="text" placeholder="Last Name" ng-model="user.last"&gt;
    &lt;/label&gt;
  &lt;/div&gt;
  &lt;button class="button button-positive"&gt;
    button-positive
  &lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Here is the validation controller file </p>
  
  <pre><code> angular.module('starter.controllers',[])
  
  .controller('DashCtrl', function($scope,$ionicPopup,Friends) {
  
  
      $scope.register=function(user){
        if(!user.first){ $ionicPopup.alert({
                         title: 'First Name Required!',
                         template:'Firstname'
                         });
        }else{
              if(!user.last){
                             $ionicPopup.alert({
                             title: 'Last Name Required!',
                             template:'Lastname'
                             });
                }else {
  
  
                          Friends.setall(user).then(function(msg){
                               console.log("From server"+msg.data);
  
                            });
                }
  
          }
      }
  
  })
  </code></pre>
  
  <p>Validation works normally when  start making changes. But it doesn't show any error messages If clicked submit without entering anything.How can i achieve this? also i want to 
  show  loading screen for the server request and it is dissmissed when the server request is complete.I am using ionicframework,and i know <code>ionic.loading</code> is used for this but How can i properly used this in my code?.Please help.</p>