This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Force refreshing on a route causes $location.path() to be wrong. #2762
Closed
Description
When I navigate to a route such as http://www.test.com/products/management
and force a refresh, the $routeProvider
fails to match it against any routes and pushes me back to http://www.test.com/products
(not even a valid route!). I think that this is because $location.path()
incorrectly reports the current path as /management
.
Here's my route configuration for reference:
angular.module('labelLogicLiveApp')
.config(function ($locationProvider, $routeProvider) {
// Use HTML5 strategy if available.
$locationProvider.html5Mode(true).hashPrefix('!');
$routeProvider
.when('/', {
templateUrl: '/views/home.html'
})
.when('/user/login', {
templateUrl: '/views/user_login.html'
})
.when('/product/management', {
templateUrl: '/views/product_management.html',
resolve: { isAuth: 'authService' }
})
.when('/product/:productId', {
templateUrl: '/views/product_details.html',
resolve: { isAuth: 'authService' }
})
.otherwise({
redirectTo: '/'
});
});
Metadata
Metadata
Assignees
Labels
No labels