grohjy
grohjy

Reputation: 2149

Is it possible to load an app in parts, module by module, in angulardart

If I want to load a small angulardart application at first and then later add modules, is it possible and how to do this.

For example:

  1. the first module will handle a websocket connection and login
  2. if login is successful, then load the main app

I'm just trying to get the big picture of the good practices of programming with angulardart.

Upvotes: 3

Views: 312

Answers (2)

pavelgj
pavelgj

Reputation: 2701

Yes. Support for deferred module loading landed in Angular.dart (not releases yet at the moment of writing). An (unofficial) example can be found here: https://github.com/pavelgj/angular_deferred_sample

Upvotes: 3

Günter Zöchbauer
Günter Zöchbauer

Reputation: 657248

There is basic support for this in Dart. This is work in progress.

Some links where this functionality was mentioned:
- 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 (somewhat dated)
- Code Splitting in Dart (also somewhat dated)

I don't know how this would work with angular.

Upvotes: 2

Related Questions