Understanding and properly utilizing enableProdMode with pure and impure pipes
Angular 2's change detection process is an elegant but fickle beast that is challenging to understand at first. While it offers huge efficiency gains over the 1.x framework, the gains can come at a cost. The development mode of Angular is activated by default, which will alert you when your code is in danger of behaving in a way that defeats the change detection efficiency gains. In this recipe, you'll implement a feature that violates Angular's change detection schema, correct it, and safely use enableProdMode
.
Note
The code, links, and a live example related to this recipe are available at http://ngcookbook.herokuapp.com/0623/.
Getting ready
Begin with a simple component: ...
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.