How To Use Change Detection Strategy in Angular

How To Use Change Detection Strategy in Angular

Learn how to improve the performance of your Angular 2+ apps with an OnPush change detection strategy. In this tutorial, you will learn about ChangeDetectionStrategy and ChangeDetectorRef.

Learn how to improve the performance of your Angular 2+ apps with an OnPush change detection strategy.

By default, Angular 2+ performs change detection on all components (from top to bottom) every time something changes in your app. A change can occur from a user event or data received from a network request.

Change detection is very performant, but as an app gets more complex and the amount of components grows, change detection will have to perform more and more work.

One solution is to use the OnPush change detection strategy for specific components. This will instruct Angular to run change detection on these components and their sub-tree only when new references are passed to them versus when data is mutated.

In this article, you will learn about ChangeDetectionStrategy and ChangeDetectorRef.

angular

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Install Angular - Angular Environment Setup Process

Install Angular in easy step by step process. Firstly Install Node.js & npm, then Install Angular CLI, Create workspace and Deploy your App.

Basics of Angular: Part-1

What is Angular? What it does? How we implement it in a project? So, here are some basics of angular to let you learn more about angular. Angular is a Typesc

Angular Sass: How To Use Sass In Angular 9 Tutorial

Sass in Angular is an extension of CSS that allows you to use things like variables, nested rules, inline imports. Angular supports Sass, CSS, and Less.

Angular 11 Facebook Social Login Example

Angular 11 login with facebook. In this tutorial, you will learn how to login with facebook in angular 8/9/10/11 app.

Angular 11 Google Social Login Example Tutorial

Angular 11 google login example. In this tutorial, you will learn how to integrate google social login in angular 11 app.