Chapter 10. Performance and Advanced Concepts

This chapter will cover the following recipes:

  • Understanding and properly utilizing enableProdMode with pure and impure pipes
  • Working with zones outside Angular
  • Listening for NgZone events
  • Execution outside the Angular zone
  • Configuring components to use explicit change detection with OnPush
  • Configuring ViewEncapsulation for maximum efficiency
  • Configuring the Angular 2 Renderer Service to use web workers
  • Configuring applications to use ahead-of-time compilation
  • Configuring an application to use lazy loading

Introduction

Angular 2 was a total rebuild for a number of reasons, but one of the biggest ones was certainly efficiency. The framework that emerged from the ashes is a sleek and elegant one, but not without ...

Get Angular 2 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.