Chapter 9. Change detection and component lifecycle
This chapter covers
- How Angular knows that a UI update is needed
- Reviewing the milestones in the life of a component
- Writing code in component lifecycle hooks
All the apps you’ve developed so far have been properly updating the UI when the user or program updates the properties of your components. How does Angular know when to update the UI? In this chapter, we’ll discuss the change detection (CD) mechanism that monitors the asynchronous events of your app and decides whether the UI should be updated or not.
We’ll also discuss the lifecycle of an Angular component and the callback method hooks you can use to provide application-specific code that intercepts important events during a component’s ...
Get Angular Development with TypeScript, Second Edition 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.