title: AngularJs redirect to route not working properly
body: <p>I am trying to redirect to another route after an event, but it shows only url change (<a href="http://localhost:8000/login" rel="nofollow noreferrer">http://localhost:8000/login</a> changed to <a href="http://localhost:8000/login#/home" rel="nofollow noreferrer">http://localhost:8000/login#/home</a>). I want to change it to <a href="http://localhost:8000/home#" rel="nofollow noreferrer">http://localhost:8000/home#</a>, but I can not figure out how to do that. And my route for this url not working.</p>
  
  <p><code>app.js</code>:</p>
  
  <pre><code>var app = angular.module('laravel', ['ngRoute'])
          .constant('API_URL', 'http://localhost:8000/')
          .config(function ($routeProvider, $locationProvider) {
  
              $routeProvider
              .when('/login', {
  
                  controller: 'authController',
                  templateUrl: 'resources/views/auth/login.blade.php',
              })
              .when('/home', {
  
                  templateUrl : "resources/views/home.bade.php",
                  controller : 'homeController'
              })
              .otherwise({
                  redirectTo: '/',
              });
          });
  </code></pre>
  
  <p><code>auth.js</code>, containing my <code>authController</code>:</p>
  
  <pre><code>app.controller('authController', function ( $scope, $http, $location, API_URL){
  
      $scope.login = function(){
  
          var url = API_URL + "login";
  
          $http.post(url, $scope.file).success(function (response) {
          console.log("coming in homepage!!");
              // sessionStorage.setItem('user', $scope.user);
              $location.path('/home');
          });
      }
  });
  </code></pre>
  
  <p>The above code just converts the URL <a href="http://localhost:8000/login" rel="nofollow noreferrer">http://localhost:8000/login</a> to <a href="http://localhost:8000/login#/home" rel="nofollow noreferrer">http://localhost:8000/login#/home</a>.</p>