diff --git a/src/ui-codemirror.js b/src/ui-codemirror.js index 2ec167f..a1ee60a 100644 --- a/src/ui-codemirror.js +++ b/src/ui-codemirror.js @@ -127,7 +127,7 @@ function uiCodemirrorDirective($timeout, uiCodemirrorConfig) { codemirror.on('change', function(instance) { var newValue = instance.getValue(); if (newValue !== ngModel.$viewValue) { - scope.$applyAsync(function() { + scope.$evalAsync(function() { ngModel.$setViewValue(newValue); }); }