title: How to refresh the page upon successful submission using angularJS
body: <p>Hi how to refresh an html page upon successful submission?
   I've tried as follows, but its not working.</p>
  
  <pre><code>$scope.submit =function(){
          data = {};
          angular.extend(data, $scope.final_data);
          angular.extend(data, { checks : $scope.final_data.checks });
          $http.post('{% url 'submit' %}', data).success(
              function(data){
                  alert('succesfully submitted');
                  $location.path('{% url 'orc_checkbinning' %}');
              }).error(function(){
                  alert('not submitted');
          })
      };
  </code></pre>
  
  <p>Am using Django framework for my project. Any idea? Thanks in advance. </p>