To optimize performance, you can set the _____ property of a component to ChangeDetectionStrategy.OnPush to make Angular check the component only when its input properties change.
- OnCheck
- changeDetectionStrategy
- detectionChangeStrategy
- ngChangeDetection
To optimize performance in Angular, you can set the changeDetection property of a component to ChangeDetectionStrategy.OnPush. This setting makes Angular check the component only when its input properties change, reducing unnecessary checks and improving performance.
Loading...
Related Quiz
- What is tree-shaking and how does the Ivy Renderer enhance it in Angular applications?
- Which RxJS operator is used to transform the items emitted by an Observable?
- What is the impact of lazy loading on the initial load time of an Angular application?
- Why might you use a Subscription in an Angular application?
- How can you define a child route in an Angular application?