In my application, when auth success, I am redirecting to /users. It works fine, and I am in users page too. But when I refresh the page, I am getting an error as:
Cannot GET /users
What does this mean?
As well my base location is / which is for login page, as well when user enter the path as /login - I am not redirecting to /. What is the issue?
Here is my router config :
(function(){
"use strict";
angular.module('meanOffice')
.config(routeConfig);
function routeConfig( $locationProvider, $stateProvider, $urlRouterProvider ){
$stateProvider
.state('login', {
url:'/',
templateUrl : 'app/views/pages/login/login.html',
controller : 'mainController as main'
})
.state('users', {
url:'/users', //refresh getting error
templateUrl : 'app/views/pages/users/users.html',
controller : 'usersController as users'
})
$locationProvider.html5Mode({
enabled: true,
requireBase: false
});
$urlRouterProvider.otherwise('/');//when type '/login' throw error
}
})();
Consoleof browser writes to you? and write, please, about the full content of error.