I have an AngularJS web application which has similar functionality to DevHttpClient.
Now I would like to have a possibility to have something similar to two-way binding between my model and <textarea/>
element, so I could just pass a JSON entity object and it was parsed into my model. It should look something like this:
Whenever model values are updated - textarea is updated and vice versa.
HTML element, responsible for model output:
<div class="preview">
<p>Preview: </p>
<textarea style="height:350px; width:550px; overflow:scroll;">{{createEntityResource | json}}</textarea>
</div>
Model is generated dynamicaly, so I guess there's no need to provide it's HTML. It's just simple input fields.
Any thoughts on how this can be achieved? Please, point me to the solution or provide some useful links / articles, express your own thoughts - every useful answer is highly appreciated and evaluated.
Thank you.
ng-model
directive instead of the{{}}
. See documentation – callmekatootie Mar 31 '14 at 16:52ng-model
will display what's in the model - so in your case, it mentions that the model is an object. Can't make out anything unless you post your controller logic that holds the value of the model. – callmekatootie Apr 1 '14 at 6:45