How do I achieve two way binding for a contenteditable element using ng-bind-html in Angular js? How do I achieve two way binding for a contenteditable element using ng-bind-html in Angular js? angularjs angularjs

How do I achieve two way binding for a contenteditable element using ng-bind-html in Angular js?


The answer, according to the comments on the question, is that you can use the ngModel directive:

<div ng-bind-html="person.nameHtml"     contenteditable="true"     ng-model="person.nameHtml"></div>