Angular 2.0 Dependency Injection - Applied To Backbone TodoMVC

Posted on by Tero Parviainen

Update 2014-05-06: Since this was written, a few changes have been made in the Angular DI library. The relevant changes are highlighted below.

Bits and pieces of AngularJS 2.0 are starting to surface: The design docs are out there for everyone to read, and there are initial implementations available for change detection, logging and profiling, templating, zones, type assertions, and the HTTP client. These are exciting times for an Angular developer!

I like how these components are being developed as independent modules in independent repositories. This makes it possible for app developers to mix and match Angular libraries with other frameworks and tools, whereas Angular 1.x has been much more of an all-or-nothing proposition.

One of the new components I find most interesting is the dependency injection library at angular/di.js. It is the library that will power dependency injection in Angular 2.0, but it is also a standalone DI framework that can be used in non-Angular contexts, enabling some of that mixing and matching.

Read more →