When a user clicks a category on the shop-landing page, a sessionStorage var is set and you are redirected to the shop page but the redirect is funky
***OLD CODE (works but breaks on iOS 7.1.1, i think it's a dirty hack. It redirects to root/shop)
.controller('myController', function ($scope) {
$scope.sortCategory = function sortCategory(category) {
sessionStorage.setItem('sortCategory', '.' + category);
window.location.assign("/shop");
};
})
***NEW CODE (doesn't work, redirects to root/shop-landing#/shop)
.controller('myController', function ($scope, $location) {
$scope.sortCategory = function sortCategory(category) {
sessionStorage.setItem('sortCategory', '.' + category);
$location.path("/shop");
};
})
The desired url is root/shop.
What is the proper way to do this?