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
The code, links, and a live example related to this recipe are available at http://ngcookbook.herokuapp.com/0623/.
Begin with a simple component: ...