I wonder how a parameters values in a state (angular-ui-router) to be an array.
1) State
.state('products-by-category', {
url: "/rent-designer-category/{price_range:int}",
params: {
price_range: { array: true }
}
})
2) Controller
var urlParams = ['bt',1,150];
$state.transitionTo('products-by-category', urlParams, {
location: true,
inherit: true,
relative: $state.$current,
notify: false
});
3) URL on browser
http://localhost:3000/rent-designer-bags/?price_range=bt&price_range=1&price_range=150
What i want the URL to be is :
http://localhost:3000/rent-designer-bags/?price_range=['bt',1,150]
Any idea how i can achieve this ? Is that possible ?