如何使用新的 Angular 路由器嵌套视口?

How can I nest viewports with the new Angular router?

我有新的 Angular 路由器 (Angular 1.4) 用于未嵌套的路由和视口。当嵌套组件有自己的视口时,我无法让它工作。我通读了我能找到的所有教程,其中 none 讨论了嵌套。我知道平行视口,但这不是我要找的。

这是我的。

https://gist.github.com/guyjacks/b15a22d84b804af5d321

-- 错误 -- https://gist.github.com/guyjacks/a0b3ecda9787692a070e

-- 这是当前答案--

新 Angular 路由器中的子组件似乎已损坏。

https://github.com/angular/router/issues/117

在有答案之前,我不会回答这个问题。

我认为这不会很遗憾地修复:https://github.com/angular/router/pull/360/files

您需要等待 Angular 2