Change detection कसरी Angular ले DOM लाई component डेटासँग sync राखछ — कुनै पनि संभावित state-changing event पछि, यो components को जाँच गर्छ र डेटा परिवर्तन भएको ठाउँमा view अपडेट गर्छ। पूर्वनिर्धारितरूपमा यो जाँच व्यापक छ; OnPush यसलाई कार्यसम्पादनको लागि संकुचित गर्छ।
Default change detection कसरी काम गर्छ
An async event fires (click, HTTP response, setTimeout) →
Zone.js notifies Angular → Angular checks the ENTIRE component tree
top-to-bottom → updates any bindings whose values changed.
पूर्वनिर्धारितरूपमा ( strategy), Angular हरेक event मा पुनः जाँच गर्छ — सही छ, तर ठूलो trees मा सम्भवतः बेकार छ।
