Recall & Review
beginner
What is change detection in Angular?
Change detection is Angular's process to check for updates in component data and update the view accordingly.
Click to reveal answer
beginner
How can frequent change detection cycles affect app performance?
Frequent cycles can slow down the app because Angular checks many components repeatedly, using more CPU and memory.
Click to reveal answer
intermediate
What is the default change detection strategy in Angular?
The default is the "Default" strategy, also known as "CheckAlways", where Angular checks the component and all its children every time change detection runs.
Click to reveal answer
intermediate
How does the OnPush change detection strategy improve performance?
OnPush tells Angular to check a component only when its input properties change or an event happens inside it, reducing unnecessary checks.
Click to reveal answer
intermediate
Name one way to reduce the performance impact of change detection in Angular.
Use the OnPush strategy, detach change detector manually, or limit heavy computations inside templates.
Click to reveal answer
What happens during Angular's change detection?
✗ Incorrect
Change detection means Angular looks for data changes to update the UI.
Which change detection strategy checks components only when inputs change?
✗ Incorrect
OnPush reduces checks by only running when inputs or events inside the component change.
What is a negative effect of too many change detection cycles?
✗ Incorrect
Too many cycles use more CPU and slow down the app.
How can you manually improve change detection performance?
✗ Incorrect
Detaching stops Angular from checking that component until reattached.
Which of these is NOT a way to reduce change detection impact?
✗ Incorrect
Running change detection more often increases performance cost.
Explain how Angular's change detection affects app performance and ways to optimize it.
Think about when Angular updates the screen and how to reduce unnecessary work.
You got /5 concepts.
Describe the difference between the default and OnPush change detection strategies in Angular.
Compare how often Angular looks for changes in each strategy.
You got /3 concepts.