Tim Deschryver 1/24/2022

Writing a performant client-side filter with [hidden] and trackBy

Read Original

This technical article compares the performance of Angular's *ngIf directive versus the HTML [hidden] attribute for client-side list filtering. It demonstrates how combining [hidden] with Angular's trackBy function prevents DOM re-creation, leading to a smoother user experience during rapid input, especially when filtered results expand. Includes a practical example with a list of 250 words.

Writing a performant client-side filter with [hidden] and trackBy

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week