@luckyluke2012 wrote:
hey guys,
I am trying to build my first app, but I have a problem: All my controllers in the child state won't be called.
Here is my structure:.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('app', { url: '/app', abstract: true, templateUrl: 'templates/app.html', controller: 'DataCtrl' }) .state('app.child1', { url: '/child1', views: { 'appContent': { templateUrl: 'templates/child1.html', controller: 'Child1Ctrl' } } }) .state('app.child2', { url: '/child2', views: { 'appContent': { templateUrl: 'templates/child2.html', controller: 'Child2Ctrl' } } }) $urlRouterProvider.otherwise('/app/child1.html'); });
DataCtrl and Child1Ctrl will be called, but Child2Child will be not. Even if I try to put it into a different view.
Thank you in advance for your help!
Posts: 1
Participants: 1