I have registered a state test
with a child .child1
, here parent (test
) working fine . when i navigate to state test.child1
URL gets changed to #/test/child1
but the view remains same , child template not working
angular.module('uiRouterSample.contacts', [
'ui.router'
])
.config(
[ '$stateProvider', '$urlRouterProvider',
function ($stateProvider, $urlRouterProvider) {
$stateProvider
.state('test',{
url:'/test',
template:'<a ui-sref="test">Parent</a> -> <a ui-sref=".child1">child1</a>',
controller: ['$scope', '$state', 'contacts', 'utils',
function ( $scope, $state, contacts, utils) {
}]
}).state('test.child1',{
url:'/child1',
template:'Child template working fine'
})
}
]
)