We have a search page and we have thousands of search attributes that can define by an admin panel. A characteristic search result page has a url like that:
http://example.com/search?a12=3213&a314=412412&a247=1941829&....
When we want to implement that page as a SPA with AngularJS by using angular-ui-router
, I couldn't understand, how can we define that route configuration and how can we read all search parameters from querystring. Because ui-router
forces to define every queryparam possibilities on route configuration to use them in $stateParams
.
$stateProvider.state('search', {
url: '/search?a1&a2&a3&a4&a5' // what about a1314?
controller: function ($stateParams) {
console.log($stateParams.a1314);
}
});
Do you know a workaround?