title: How to redirect with $http_post AngularJS + Laravel ?
body: <p>This morning I discover the $http_method and it's fantastic ! but.... I have one problem another time XD</p>
  
  <p>First I send the content correct and the DataBasae was update correctly but when I try to update the site with the following code I have an error.</p>
  
  <pre><code> $timeout(function() {
                  $location.path('/');
                });
  </code></pre>
  
  <p>My code is this </p>
  
  <pre><code>$scope.processForm = function() {
                  $http({
                      method  : 'POST',
                      url     : 'todos',
                      data    : $.param($scope.formData),  // pass in data as strings
                      headers : { 'Content-Type': 'application/x-www-form-urlencoded' }  // set the headers so angular passing info as form data (not request payload)
                  })                
              };
  </code></pre>
  
  <p>The controler in my files route.php in Laravel is the next:</p>
  
  <pre><code>Route::post('todos', function()
      {
          $user = new Nodes;
          $user-&gt;name = Input::get("name");
          $user-&gt;save();
  
      });
  </code></pre>
  
  <p>I don't know how to update the webpage when I send the content in the form ... any solutions about this ? </p>