How to select the element on Angular Template ref

mabdullahse
Jan 24, 2022

--

we will be riding into:

  • Fetch/Get the Template ref instance.
  • Passing it Observable for later use.
  • Create EmbeddedView
  • Explore what's inside it

Get the Template ref instance

Let's have a HTML file with template

Passing it Observable for later use.

And on ts file

Let receive on service file

Create EmbeddedView

We can subscribe this template ref Subject on some component

Explore what’s inside it

Create HTML element out of template ref. For example, I want to see, does it contain the class as follows

--

--

mabdullahse
mabdullahse

No responses yet