I am trying to do addapt the contenteditable directive I foud on angularjs website (http://docs.angularjs.org/guide/concepts#directives).
My problem is that if I change the value inside the contenteditable div inside my controller, the scope value is updated but the value in the div isn't. I would like to be able to do something like this in my main controller :
$scope.content = $scope.content.concat("added text");
This updated the $scope.content but it does not update the contenteditable div. And so, if I click in the div to edit it, my modification is gone.
In order to make it work, I would have to call ctrl.$render from my controller but I can't find any documentation on what is this 4th parameter of the link function.
Does anyone have an idea what this 'ctrl' parameter represents and if by change some know how to solve my problem :)
require
parameter. In this casectrl
is an instance of the ngModelController. – Mark Rajcok Mar 20 at 18:27