add $location of angular.js to parse url parmas
parse query in url parmas and set query default serach pattern to it if query params exists