4 ms·
How does Angular 2 change detection really work?
- vfc1 11y agoTLDR: by default it compares the values of all template bindings before and after the VM turn using === like in Angular 1. But the change detector code is optimizable by the VM. Unlike Angular 1 this is customizable. OnPush is not only compare by reference, it also triggers change detection if events are emitted.