title: Uncaught SyntaxError: Unexpected token . in angular $location
body: <p><code>$location.path('/user/logout');</code> </p>
  
  <p>This line gets an error <code>Uncaught SyntaxError: Unexpected token .</code> in console. It goes when that line is commented. What is the wrong with my code pls.</p>
  
  <pre><code>angular.module('symphony', ['ngRoute'])
  
          .config(function($routeProvider, $locationProvider, $location) {
  
      $routeProvider
              .when('/user', {
          templateUrl: '/angular/pages/user.php',
          controller: enterpriseController,
      })
  
              .when('/modules', {
          templateUrl: '/angular/pages/merchant/dash.php',
          controller: merchantController,
      })
  
               .when('/user/logout', {
          $location.path('/user/logout');
      });
  
  
      $locationProvider.html5Mode(true);
  });
  </code></pre>