Most of the time, we are using JavaScript techniques inside angular. we almost forget about the Framework’s features. Let’s utilize them.

Most of the angular developers were starting their career in JavaScript and then they came up into Angular. So they are more comfortable in JavaScript. Yeah! That’s pretty cool. But still, we are using JavaScript techniques inside angular mostly. One of them is DOM Manipulation.

For a long time, I was using core JavaScript techniques to manipulate the DOM in Angular. I always use “document. ” object in angular. I don’t even use template reference variables. I directly manipulate the DOM. Is that correct? No, it is not. Don’t do that mistake. Angular has a lot of features. Angular makes our DOM manipulation easy and it makes our code more structured and scalable. Alright, Let see about DOM manipulation in angular.

Usually, there are two concepts in DOM Manipulations.

  1. Modifying DOM Elements.
  2. Modifying DOM Structure.

#angular #javascript #dom-manipulation #typescript #angular10 #components

How to do DOM Manipulation properly in Angular?
21.75 GEEK