My Angular app allows the user to load an item, and when that happens I\'d like to set a query string that contains the item\'s Id so that if the user refreshes the page (or
In your $routeProvider configuration set reloadOnSearch to false:
reloadOnSearch
$routeProvider .when('/items', { controller: 'ItemsCtrl', templateUrl: '/templates/items', reloadOnSearch: false }, ... );
and in your controller use $location.search() to set the id param:
$location.search()
id
$location.search('id', 123);