Form submitting not working in angularJS?
<p>I am developing an angularJS application using Ionic framework for layout design. For some reason my form is not being submitted. The function is supposed to submit username and password and POST it to an online PHP file. Here is my code:</p>

<p>Template:</p>

<pre><code>&lt;ion-view title="Login"&gt;
    &lt;ion-content overflow-scroll="true" padding="true" class="has-header"&gt;
&lt;?php include '../lib/init.php'; ?&gt;
        &lt;form class="list validate" ng-submit="submit()"&gt;
          &lt;input type="hidden" name="action" value="login"&gt;
            &lt;ion-list&gt;
                &lt;label class="item item-input"&gt;
                    &lt;span class="input-label"&gt;Username&lt;/span&gt;
                    &lt;input type="text" ng-model="username" name="username" placeholder=""&gt;
                &lt;/label&gt;
                &lt;label class="item item-input"&gt;
                    &lt;span class="input-label"&gt;Password&lt;/span&gt;
                    &lt;input type="password" ng-model="password" name="password" placeholder=""&gt;
                &lt;/label&gt;
            &lt;/ion-list&gt;
            &lt;div class="spacer" style="height: 40px;"&gt;&lt;/div&gt;
            &lt;button type="submit" id="login-button4" class="button button-royal  button-block"&gt;Log in&lt;/button&gt;
            &lt;a ui-sref="register" id="login-button5" class="button button-royal  button-block button-clear"&gt;Dont have an account?&lt;/a&gt;
            &lt;a ui-sref="forgotPassword" id="login-button6" class="button button-royal  button-block button-clear"&gt;Forgot password?&lt;/a&gt;
        &lt;/form&gt;
    &lt;/ion-content&gt;
&lt;/ion-view&gt;
</code></pre>

<p>Controller:</p>

<pre><code>.controller('loginCtrl', function($scope, $state, $stateParams, $ionicPopup, $timeout) {

  //popup alert starts here
   $scope.showAlert = function(status,message) {
   var alertPopup = $ionicPopup.alert({
     title: status,
     template: message,
   });
 };
 //popup alert ends here


  $scope.submit = function() {
        if ($scope.username &amp;&amp; $scope.password) {
          var url = 'my PHP file url';
          var username= $scope.username;
          var password= $scope.password;

          $scope.list = [];


          var dataString = 'username='+ username  + '&amp;password=' + password;
          $scope.list.push(dataString);
          $scope.text = '';

          $http({
            type: "POST",
            url: url,
            data: dataString,
            success: function(data) {
            try 
            {
              alert(data);
            } 
            catch(e) 
            {
              alert(data);
            }   
            }
            });


        }
      };

})
</code></pre>

<p>Route:</p>

<pre><code>  .state('login', {
    url: '/login.php',
    templateUrl: 'templates/login.php',
    controller: 'loginCtrl'
  })
</code></pre>

<p>Does anyone know whats going on?</p>