I want to be able to create form elements like inputs via javascript, insert it into the DOM and then add bind it to an angular reactive form.
component
var el = document.createElement('input');
document.getElementById("form").appendChild(el)
-->what to do next?
template
<form [formGroup]="form" #fromRef id="form">
--><input>
--><select>
</form>
EDIT
I am are of the "normal" approach to loop over "pre-binded" components or DOM elements. I am really interested if there is a way to do this completely dynamically.