I have a ui router route that is defined as follows
$stateProvider
.state('search', {
url: '/search',
abstract: true,
parent: 'loggedIn',
views: {
wrapper: {
controller: 'MyCtrl',
controllerAs: 'myCtrl',
templateUrl: '/scripts/views/search/views/search.wrapper.html'
}
}
})
.state('search.subs', {
url: '',
resolve: {
isLoggedIn: isLoggedIn
},
views: {
body: {
controller: 'SearchBodyCtrl',
controllerAs: 'searchBodyCtrl',
templateUrl: '/scripts/views/search/views/search.body.html'
}
}
});
Anyways the issue is that I cannot generate a query parameters so that the url looks like /search?hello=world
I tried using $state.transitionTo('search.subs', {hello: 'world'})
but that didn't work. I figured any params I passed that did not match would just be put in the query string but that is not the case.