Angular 2 Dependencies

systemjs
es6-promise
es6-shim
reflect-metadata
rxjs
zone.js

systemjs

  • js module loader, System.js is the one that Angular team prefers, other module loaders webpack, browserify

es6-promise

This library (es6-promise) is a polyfill for es6 promises, meaning it brings es6 promises into es5.

es6-shim

Apart from promises, es6 brings many other useful features, like modules, classes, etc. This library provides compatibility shims so current JS engines behave as close as possible to es6.

reflect-metadata ( currently annotation acheived with typescript)

With es7, we will be able to add metadata (also called annotation or decorator) to a class or function.

This library is a polyfill for metadata API in es7.

@Component({
    selector: “app”
})
class AppComponent{}

rxjs

Anlegant way to work with asynchronous operations. Promise does good job but Angular 2 embraces observables.

zone.js

One of the complexities of Angular 1 is its digest loop, which helps Angular 1 figure out the changes in the model and refresh the view. In Angular 2 we don’t have this concept anymore. In Angular 2, all browser events are “monkey-patched”, so even if you an event handler outside your Angular app, it will still be notified and can detect changes in objects. Angular team have extracted this part from the core Angular script and opensourced it as a separate library that can be re-used by others. This library is called zone.js.

Last updated

Was this helpful?