是否有任何博客 post 可以指导我使用 ui-router 和 angular 组件?

Is there any blog post which can guide me to use ui-router with angular components?

我想用 1.5 转换 Angular 应用程序,但我们使用了 ngComponentRouter。由于它已被弃用,我希望转向 ui-router。但是,如果我们制作哑组件,所以我在想我们如何将它们与 ui-router.

合并

请推荐任何可以提供帮助的博客。

谢谢

有关详细信息,请参阅此问题 https://github.com/angular-ui/ui-router/issues/2627。可能这是现在的 alpha 版本。

恕我直言,您可以在 "templateUrl" 中使用经典组件和 link 其模板来定义您的状态。

ui-router 1.0 现在处于测试阶段,据我所知,几周后就会稳定下来。在这个版本中,状态有一个组件 属性 可以直接路由到组件。

最新的 API 文档链接到 the 1.0 version

  .config(function ($stateProvider) {
    $stateProvider
      .state('hello', {
        url: '/hello',
        component: 'hello'
  });