I have nested UI states. I want to load only child state not the parent state.
Child State :
$stateProvider.state('app.test', {
url: '^/test?search',
controller: 'TestController',
templateUrl: 'test/test.tpl.html',
pageTitle: 'Tests',
});
Parent State :
$stateProvider.state('app', {
url: '/app',
abstract: true,
templateUrl: 'parent/main-content.tpl.html',
controller: 'ParentController'
})
When I try to load only child state in test page using
$state.go('.', {search: searchTerm});
It loads only child state.
And when I try $state.reload();
, it loads both state and so there controllers.
If I don't have searchTerm parameter for state, then how can I load only current state ?