-1

I have following html string that i can fetch from http service:

When uranium was {{1}} to be radioactive, Marie Curie found that the element called {{2}} had the same property.

I want to replace {{1}} and {{2}} with reactive form control in angular 5 dynamically. how?

pka246
  • 193
  • 10

2 Answers2

0

It isn't possible to generate reactive form inputs dynamically as they should be rendered by Angular.

But you can have this inputs in html prepared but hidden. Then set text in appropriate places and make visible.

Alex Vovchuk
  • 2,828
  • 4
  • 19
  • 40
0

Angular Dynamic Compile component, that turns a string into a compiled component

dynamic template to compile dynamic Component

pka246
  • 193
  • 10