title: Yeoman, Grunt, AngularJS and error 404 on POST form
body: <p>I am trying to send a form with "POST" method with AngularJS. I use $http to send it but it always return "Cannot POST" and 404 error. The route is correct and only happens if I execute my app via Grunt (sending by "GET" works perfect). The app has been built using Yeoman.</p>
  
  <p>I think that it has to be a silly problem but I cannot make it work.</p>
  
  <p>The view:</p>
  
  <pre><code>&lt;form name="formLogin" ng-submit="login()"&gt;
  
  &lt;ul&gt;
      &lt;li&gt;
          &lt;label for="user"&gt;User&lt;/label&gt;
          &lt;input type="text" id="user" name="user" ng-model="user"&gt;
      &lt;/li&gt;
      &lt;li&gt;
          &lt;label for="pass"&gt;Password&lt;/label&gt;
          &lt;input type="password" id="pass" name="pass" ng-model="pass"&gt;
      &lt;/li&gt;
  
  &lt;/ul&gt;
  
  &lt;input type="submit" value="Send"&gt;
  </code></pre>
  
  <p></p>
  
  <p>The controller:</p>
  
  <pre><code>    'use strict';
  angular.module('myApp')
    .controller('LoginCtrl', function ($scope, $http, $resource) {
  
  
      $scope.login = function() {
  
        var config = {
          url: 'php/login.php',
          method: 'POST',
          data: {
              user: $scope.user,
              pass: $scope.pass
          }
        }; // configuration object
  
        $http(config)
          .success(function(data, status, headers, config) {
              console.log('success');
              if (data.status) {
                // succefull login
  
              } else {
                // Wrong login
              }
          })
          .error(function(data, status, headers, config) {
              console.log('error');
  
          });
  
      };
  
    });
  </code></pre>
  
  <p>I use Grunt with: </p>
  
  <pre><code>grunt server
  </code></pre>
  
  <p>Why happens that?</p>
  
  <p>Thanks!</p>