在 Angular 中应该如何构造导致另一个嵌套路由的嵌套路由? UI.Router

How should nested routes leading to another nested route be structured in Angular? UI.Router

我已经将我所有的 UI.Router 状态写成 Angular 指令,组件的样式如本教程中所示:http://www.angular-meteor.com/tutorials/socially/angular1/routing-and-multiple-views)

这就是我想要做的。我有 3 个具有以下嵌套状态的主要状态:

-- 仪表板
-- 个人笔记
------- 解锁个人笔记
------- 锁定个人笔记
-- 公众笔记
------- 已解锁PublicNotes
------- lockedPublicNotes

可以看到,PublicNotes -> UnlockedPublicNotes 是一个嵌套状态。 UnlockedPublicNotes(和兄弟姐妹)是一个列出注释的页面。单击注释应将您带到“详细注释”页面。我的问题是,详细注释会是它自己的嵌套状态吗?

目前我的路由是这样的:

$stateProvider
        .state('dashboard', {
          url: '/dashboard',
          template: '<dashboard></dashboard>'
        })
        .state('personalNotes', {
          url: '/personalNotes',
          template: '<personal-notes></personal-notes>'
          })
        .state('publicNotes', {
          url: '/publicNotes',
          template: '<public-notes></public-notes>'
        })

我应该如何在 Angular 的 UI.Router 中进行设置?也许有比三重嵌套状态更好的方法。

如果重要的话,我正在使用 Angular-Meteor。 谢谢您的帮助! :)

这可能是嵌套结构:

$stateProvider
  .state('dashboard', {url: '/dashboard',template: '<dashboard></dashboard>'})
  .state('personalNotes', {url: '/personalNotes',template: '<personal-notes</personal-notes>'})
  .state('publicNotes', {url: '/publicNotes',template: '<public-notes></public-notes>'})
  .state('publicNotes.unlocked', {url: '/unlocked', template:'<ulpn></ulpn>'})
  .state('publicNotes.locked', {url: '/locked', template:'<lpn></lpn>'})
  .state('publicNotes.unlocked.details', {url: '/details', template:'<note-details></note-details>'})
  ...