ui-ace
ui-ace copied to clipboard
Set validity of ngModel
Hey,
what would be the best way to set the validity of ngModel, based on the value of getAnnotations
?
I can access the getAnntations
values by doing the following in my controller
$scope.aceLoaded = function(editor) {
editor.getSession().on('changeAnnotation', function() {
var annot = editor.getSession().getAnnotations();
});
};
Within the uiAce
directive it would be possible to set the validity of the model by calling ngModel.$setValidity('annotations', isValid)
Whats your opinion about implementing this within the uiAce
directive?
Bests, Mark
hello, Yes, it would be great to set validity of the form if ace editor has error annotations. Philippe
what is the status of this issue ? I find the need of marking the editor as invalid as well.
+1
+1
+1
+1
+1