I'm trying to replace specific string in my text with inputs with ng-models. I used following code:
inlinetext.replace(buffer[x], '<input ng-model="singleQuestion.inlines[' + x + '].checkAnswer" type="text">');
It render HTML input field in view as expected:
<input ng-model="singleQuestion.inlines[0].checkAnswer" type="text">
But ng-model won't update model. I've actually tried to hard-code the same piece of code in HTML view and it worked perfectly. So it must be something in way how angular render view.
My goal is to display text paragraph where are specific words replaced with inputs (with ng-model property). Problem is that Angular doesn't compile anything that you put in view through .replace() function.
Does anybody have some idea how to do that?