angular How to do DOM Manipulation properly in Angular? Often when we are using JavaScript techniques inside Angular, we almost forget about the frameworkâs features. Let's utilize them.
javascript Here is why appendChild moves a DOM node between parents A light introduction into DOM fundamentals through an insightful quiz. You'll learn how HTML is transforms into JavaScript objects to eventually become part of the Document tree.
angular Exploring Angular DOM manipulation techniques using ViewContainerRef The article explores common elements used for DOM manipulation in Angular with a particular focus on ViewContainerRef. Learn why they are needed, how they work and when you need to use which.
angular Working with DOM in Angular: unexpected consequences and optimization techniques This article explains a clever optimization techniques that could be applied to scenarios where ngFor is commonly used. You'll learn what is an embedded view and how to re-use it instead of destroying on each iteration.
angular Here is how to get ViewContainerRef before @ViewChild query is evaluated ViewContainerRef can usually only be used after ngAfterViewInit hook. This article shows how to get access to ViewContainerRef earlier using a directive instead of template reference and ViewChild query.