I am using ngTable that use filters in the format filter[foo]
, filter[bar]
, sorting[foo]
, sorting[bar]
.
I want to pass this parameters as URL, but as I am using UI Router, I need to declare them in the state definition.
So I tried to setup a state like this
.state('admin.results', {
url: '/results?filter[foo]',
templateUrl: 'app/results.tpl.html',
controller: 'ResultCtrl'
})
but the square brackets look to be interpreted as a regex, so I get an error like this
Invalid parameter name 'filter[foo]' in pattern '/results?filter[foo]'
I also tried escaping the brackets url: '/results?filter\[foo\]'
but again I receive the same error.
You can try it in this plunkr.