How to Use ngDoCheck in Angular

The ngDoCheck lifecycle hook in Angular allows you to implement custom change detection logic for cases where Angular’s default change detection isn’t sufficient. As the creator of CoreUI with over 11 years of Angular development experience, I use ngDoCheck for components that need to detect changes in complex objects, arrays, or when working with immutable data structures. This hook runs on every change detection cycle, so it requires careful implementation to avoid performance issues.

Read More…

How to Use ngOnChanges in Angular

The ngOnChanges lifecycle hook in Angular is called whenever input properties of a component change. As the creator of CoreUI with over 11 years of Angular development experience, I use ngOnChanges to react to parent component data changes and trigger appropriate responses in child components. This hook provides detailed information about what changed, including previous and current values.

Read More…
Subscribe to our newsletter
Get early information about new products, product updates and blog posts.
How to check if a key exists in JavaScript object?
How to check if a key exists in JavaScript object?

How to force a React component to re-render
How to force a React component to re-render

How to Use Bootstrap Dropdown in Vue 3 – CoreUI Integration Guide
How to Use Bootstrap Dropdown in Vue 3 – CoreUI Integration Guide

How to Add a Tab in HTML
How to Add a Tab in HTML

Answers by CoreUI Core Team