Video Course

Getting Started with Angular v2+: Lesson 6 of 26

Angular Dependencies

Up Next

Angular Packages

Autoplaying in 7 seconds!

Cancel
⬇⬇⬇ Important: There have been updates since this video was created. Read the notes below. ⬇⬇⬇

Important Note

The Angular dependency versions change as new versions are updated. See below for the most current versions.

npm install core-js reflect-metadata zone.js rxjs systemjs --save

A running theme with using Angular 2 is that we want to use great new ES6 features that aren't yet supported by browsers. This is why we need transpilers, loaders, polyfills, and shims.

These dependencies help provide some functionality for Angular 2 that make our apps better.

  • core-js client/shim: Adds es6 features to browsers that don't have them
  • zone.js: An execution context. Helps with change detection and showing errors. Anyone from angular 1 will know that seeing console errors and trying to debug was near impossible. Provides stack traces. Helps Angular run change detection throughout our app.
  • reflect-metadata: Polyfill for decorator metadata. Used to apply decorators to our code (Component is a decorator). A clean way of adding metadata to our classes.
  • rxjs: Libraries that help create asynchronous data streams. Gives us Observables. The Angular 2 http library uses these heavily and is the preferred way of handling async events in Angular 2.

Install them all using:

npm install core-js reflect-metadata zone.js rxjs@5.0.0-beta.12 systemjs --save

Minor note, at the time of this course, Angular 2 requires RxJS 5.0.0-beta.12. For the latest requirement, check quickstart package.json.

Chris Sevilleja

162 posts

Co-founder of Scotch.io. Slapping the keyboard until something good happens.