【问题标题】:Is it possible to load an app in parts, module by module, in angulardart是否可以在angulardart中逐个模块地加载应用程序
【发布时间】:2014-03-09 10:53:05
【问题描述】:

如果我想先加载一个小型 angulardart 应用程序,然后再添加模块,是否有可能以及如何执行此操作。

例如:

  1. 第一个模块将处理 websocket 连接和登录
  2. 如果登录成功,则加载主应用程序

我只是想全面了解使用 angulardart 编程的良好实践。

【问题讨论】:

    标签: dart angular-dart


    【解决方案1】:

    是的。 Angular.dart 支持延迟模块加载(在撰写本文时尚未发布)。可以在这里找到一个(非官方)示例:https://github.com/pavelgj/angular_deferred_sample

    【讨论】:

      【解决方案2】:

      在 Dart 中有对此的基本支持。这是正在进行的工作。

      提到此功能的一些链接:
      - https://plus.google.com/+MatthewButler/posts/fHbbVuUhSni
      - https://code.google.com/p/dart/issues/detail?id=17110
      - http://blog.sethladd.com/2013/04/lazy-load-libraries-in-dart.html(有点过时了)
      - Code Splitting in Dart(也有些过时了)

      我不知道这将如何与 angular 一起使用。

      【讨论】:

      • 感谢您的澄清,让我们拭目以待。
      猜你喜欢
      • 2017-07-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-04-06
      • 2014-06-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多