1
UI 라우팅 설정에 게시 된 기사를 기반으로 간단한 예제를 설정했습니다.AngularJs UI 라우팅을위한 State.go
$state.go()
을 사용하여 자식 중첩 상태에서 형제 상태로 명시 적으로 탐색하도록 테스트를 수정했습니다. 내가 뭘 잘못하고 있는거야? Error resolving State. Could not resolve .paragraph from state home.list
$stateProvider
// HOME STATES AND NESTED VIEWS ========================================
.state('home', {
url: '/home',
templateUrl: 'partial-home.html'
})
// nested list with custom controller
.state('home.list', {
url: '/list',
templateUrl: 'partial-home-list.html',
controller: function($scope,$state) {
$scope.dogs = ['Bernese', 'Husky', 'Goldendoodle'];
$scope.navigateToNextState = function() {
$state.go('.paragraph');
};
}
})
// nested list with just some random string data
.state('home.paragraph', {
url: '/paragraph',
template: 'I could sure use a drink right now.'
})
http://plnkr.co/edit/Nae6xz9qcBp3IRYi0wcD?p=preview