Renderer2 in Angular | Directives | Angular 12+

Поділитися
Вставка
  • Опубліковано 8 лют 2022
  • The Renderer2 allows us to manipulate the DOM elements, without accessing the DOM directly. It provides a layer of abstraction between the DOM element and the component code.
    Using Renderer2 we can create an element, add a text node to it, append child element using the appendchild method., etc. We can also add or remove styles, HTML attributes, CSS Classes & properties, etc. We can also attach and listen to events etc.
    Renderer2 is a class which provides some useful methods to manipulate the DOM without accessing the DOM elements directly. Let's understand the use of Renderer2 with an example in this lecture.

КОМЕНТАРІ • 8

  • @tsvetanabogdanova2342
    @tsvetanabogdanova2342 2 роки тому

    Very well explained for beginners. Short and clear. Thank you. Keep going.

  • @mohammedabdulaziz3658
    @mohammedabdulaziz3658 2 роки тому +1

    Thank you sir , for saying about security which XSS injection..
    #informatic useful ( render2 making a layer of dom give a security)

  • @maheshsirsat1811
    @maheshsirsat1811 11 місяців тому

    Done

  • @narenderkonka9001
    @narenderkonka9001 Рік тому

    Just one question here Angular14 features you covered as part of this playlist?

  • @TrqHsn
    @TrqHsn Рік тому +1

    Sir, when we can do this in html file then why we need to do this through directive?

  • @supergames996
    @supergames996 2 роки тому +1

    I am following your classes they are good, but one correction in this class, private property in constructor can be used outside-> that is typescript feature not angular.

    • @procademy
      @procademy  2 роки тому +7

      That's right. Thank you for the correction.

  • @narenderkonka9001
    @narenderkonka9001 Рік тому

    ivy,lazy loading,initializer concepts?