
Angular 2 RC5 release enables ahead of time compilation and lazy loading - xpto123
http://blog.angular-university.io/angular2-ngmodule/
======
xpto123
This is a post on how the latest Angular 2 release and the NgModule feature
will enable transparent ahead of time compilation for minimal bundle sizes
plus transparent easily configurable lazy loading.

This feature coupled with upcoming angular-cli versions will make features
like minimal bundles and lazy loaded apps much simpler to make than ever
before. the angular-cli will actually provide these features pretty much
transparently.

The developer will only have to add some minimal config by defining modules
and passing modules to the router to make them lazy loadable. But there are
some minor pitfalls to bear in mind in what relates to dependency injection.

