I have an html page father with:
<div id="..." class="container">
<pp-nav></pp-nav>
<div ui-view></div>
</div>
This is my controller with a father and two child:
export function routerConfig($stateProvider: angular.ui.IStateProvider, $urlRouterProvider: angular.ui.IUrlRouterProvider) {
$stateProvider
.state('gestionePeP', {
url: '/gestionePeP',
templateUrl: '.../gestionePeP/gestionePeP.html'
})
.state('gestionePeP.puntiAttivazione', {
url: '/puntiAttivazione',
templateUrl: '.../gestionePeP/puntiAttivazione.html'
})
.state('gestionePeP.gestioneContenuti', {
url: '/gestioneContenuti',
templateUrl: '.../gestionePeP/gestioneContenuti.html'
});
I want that when I go to the father page the stateprovider opens the father html page with the first child inside it. How can I do it?
If I put a link inside a button in the father with
ui-sref="gestionePeP.puntiAttivazione"
it opens the right page. But I want the same behaviour without any click. I tried $state.go('gestionePeP.puntiAttivazione') but it goes in loop. How can I solve?