With the introduction of Angular 2 comes the concept of zones. Before you begin this recipe, I strongly recommended you to begin by working through the Working with zones outside Angular recipe.
zone.js is a library that Angular 2 directly depends upon. It allows Angular to be built upon a zone that allows the framework to intimately manage its execution context.
More plainly, this means that Angular can tell when asynchronous things are happening that it might care about. If this sounds a bit like how
$scope.apply() was relevant in Angular 1.x, you are thinking in the right way.
Angular 2's integration with zones takes the form of the
NgZone service, which acts as a sort of wrapper for the actual Angular ...