3
votes

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.

2

2 Answers

3
votes

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

2
votes

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.