For example, i have this url: http://local.com/. When i called function in my SearchController i want set text=searchtext and get url like this:
http://local.com/?text=searchtext.
How i can do it? I tried $location.search('text', 'value'); but got this url:
http://local.com/#?text=searchtext
$scope.searchTracks = function() {
Search.search.get($scope.params, function(data) {
/** Set params in query string */
$location.search('text', $scope.text);
$location.search('sorted', $scope.sorted);
});
}