Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70440

[Ionic 5 - Angular] Recommended way to add dynamic elements to the DOM

$
0
0

What is the recommended way to add and remove dynamic elements to the DOM with Ionic and Angular? I was just injecting them with Javascript appendChild which did append the element to the DOM but i am not able to modify the element once appended (like add/remove a class to the element).

The elements are varied, so i can’t use just a *ngFor loop.

Usecase: Its a calling app wherein each time a new user joins, i create a div with different elements and a video element and append it to the DOM, then when different events happen like user toggling off his camera, i need to apply changes to the appended element.

Thanks.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 70440

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>