I have a screen that allows the user to edit several HTML sections in the same page. So there's a $scope variable called contents, that has a bunch of objects with HTMLs in them, and a single editor, with the ng-model pointing to $scope.content. When the user selects a file, the ng-click event points $scope.content to the appropriate item in $scope.contents.
When the user writes a bunch of text in the editor, then clicks another item, the model is appropriately updated and the editor is reloaded with the contents of the other item. When this is repeated 3 or 4 times, the editor stops updating its content, and stops updating the model. A few more clicks here and there and both are updated, but some of the things the user typed on the editor are not saved.
I have a screen that allows the user to edit several HTML sections in the same page. So there's a
$scope
variable calledcontents
, that has a bunch of objects with HTMLs in them, and a single editor, with theng-model
pointing to$scope.content
. When the user selects a file, theng-click
event points$scope.content
to the appropriate item in$scope.contents
.When the user writes a bunch of text in the editor, then clicks another item, the model is appropriately updated and the editor is reloaded with the contents of the other item. When this is repeated 3 or 4 times, the editor stops updating its content, and stops updating the model. A few more clicks here and there and both are updated, but some of the things the user typed on the editor are not saved.
Example: https://plnkr.co/edit/ufSY8KoYJTjBCeBTSpTw?p=preview
How to reproduce: