angularjs - ngModel that points to dynamic html -



angularjs - ngModel that points to dynamic html -

i have repeater setup looks this

<table class="table table-condensed"> <tr ng-repeat="m in resp.availabletemplates"> <td> <input type="checkbox" ng-model="m.selected" /> <span ng-bind-html="m.messagetext"></span> </td> </tr> </table>

where m.messagetext string looks

hello <input type='text' value=''/>!, <input type='text' value=''/>

the user see list of template phrases, check off desired phrases, fill in text areas, , submit sends email filled in phrases provided.

by using ng-bind-html, output looks should. when using ng-model, output doesn't display html. how can bind info renders proper html, allows me gather info provided user?

try this:

<span ng-bind-html="{{m.messagetext}}"></span>

angularjs angular-ngmodel ng-bind-html

Comments

Popular posts from this blog

python - How to add an model instance to a django queryset? -

Using Android Volley to post an array to PHP -

angularjs - No 'Access-Control-Allow-Origin' error from local domain to public API -