Upon clicking a category on the shop-landing page, a sessionStorage variable is established and the user is redirected to the shop page. Unfortunately, there seems to be an issue with the redirection process.
***EXISTING CODE (functional but not compatible with iOS 7.1.1; appears to be a temporary solution. Redirects to root/shop)
.controller('myController', function ($scope) {
$scope.sortCategory = function sortCategory(category) {
sessionStorage.setItem('sortCategory', '.' + category);
window.location.assign("/shop");
};
})
***UPDATED CODE (currently not functioning as expected, redirects to root/shop-landing#/shop)
.controller('myController', function ($scope, $location) {
$scope.sortCategory = function sortCategory(category) {
sessionStorage.setItem('sortCategory', '.' + category);
$location.path("/shop");
};
})
The target URL should be root/shop.
What is the correct approach to resolve this issue?