-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Hi,
I've been working with ui-router for awhile and I'm currently experiencing problems with the parameters of a state.
Here's the state declaration:
.state('home', {
parent: 'auth',
url: '/?tags.network&tags.teams',
reloadOnSearch: false,
views: {'@root': { templateUrl: '/views/partials/series/index.html', controller: 'LandingCtrl' }}
})
As you can see I want the parameters to be called 'tags.network' and 'tags.teams', ui-router is throwing the following error:
Duplicate parameter name 'tags' in pattern '/?tags.network&tags.teams'.
To inspect further I dropped some breakpoints and noticed that ui-router splits the strings by the dot and therefore creates 4 parameters tags, network, tags and teams (this fails because tags is repeated).
I then change the URL to: '/?tags.network', doing $state.go('home', {'tags.network':'AMC'}) changes the state but the parameter is not present. Since I know ui-router is splitting by the dot, I tried the following: $state.go('home', {'network':'AMC'}) and it worked.
Has anyone experienced this ? What can be done ? Is it illegal to have dots in the params keys ?
Thanks,
-Ricardo.