I have a unordered <ul>
list element that I want to add items to from my Javascript. Just small, simple snippets such as <li>Label: Text</li>
.
I could use the ViewContainerRef.createComponent(ItemComponent)
and create a new component for a list item, but I feel that is so overkill when I just want to insert such a simple snippet of HTML to the DOM.
What's the best way to add these type of simple, short HTML snippets to the DOM when it does not require a full component?
list element that I want to add items to from my Javascript.* Emphasis on the *Javascript*. I don't know why you edited in the tag TypeScript, this question is nothing of the sort.
– Okx Jun 19 '17 at 13:02