Javascript UI路由器嵌套视图赢得';t渲染(无错误)

Javascript UI路由器嵌套视图赢得';t渲染(无错误),javascript,angularjs,angular-ui-router,Javascript,Angularjs,Angular Ui Router,在我的Angular UI项目中,我的配置中有嵌套视图。当我在浏览器中加载网页时,这些嵌套视图不会显示,尽管控制器启动且父视图正确呈现。所有应该在范围内的东西也在范围内 这是我的配置 angular.module('quizApp', ['ui.router']) .config(function($stateProvider, $urlRouterProvider) { $urlRouterProvider.otherwise('/'); $stateProvider .state('hom

在我的Angular UI项目中,我的配置中有嵌套视图。当我在浏览器中加载网页时,这些嵌套视图不会显示,尽管控制器启动且父视图正确呈现。所有应该在范围内的东西也在范围内

这是我的配置

angular.module('quizApp', ['ui.router'])
.config(function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/');

$stateProvider
.state('home', {
  templateUrl: 'components/home/homeView.html',
  controller: 'homeCtrl',
  url: '/'
})
.state('quiz', {
  controller: 'quizCtrl',
  url: '/quiz/:quizName',
  templateUrl: 'components/quiz/views/quizContainerView.html'
})
.state('quiz.view', {
  parent: 'quiz',
  views: {
    'list': {
      templateUrl: 'components/quiz/views/questionListWrapperView.html'
    },
    'detail': {
      templateUrl: 'components/quiz/views/questionDetailView.html'
    }
  }
})
})
quick.view列表和详细信息将显示在页面上

这是我的回购协议


谢谢你的帮助

您错过了子视图上的url属性

$stateProvider
.state('home', {
  templateUrl: 'components/home/homeView.html',
  controller: 'homeCtrl',
  url: '/'
})
.state('quiz', {
  controller: 'quizCtrl',
  url: '/quiz/:quizName',
  templateUrl: 'components/quiz/views/quizContainerView.html'
})
.state('quiz.view', {
  parent: 'quiz',
  url: '/something',
  views: {
    'list': {
      templateUrl: 'components/quiz/views/questionListWrapperView.html'
    },
    'detail': {
      templateUrl: 'components/quiz/views/questionDetailView.html'
    }
  }
})
})

嵌套的视图将是/quick/:quizName/something

您是否找到了它?找朋友