ui-ace icon indicating copy to clipboard operation
ui-ace copied to clipboard

Set validity of ngModel

Open mren opened this issue 10 years ago • 7 comments

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 uiAcedirective 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

mren avatar May 14 '14 13:05 mren

hello, Yes, it would be great to set validity of the form if ace editor has error annotations. Philippe

chachou29 avatar Jul 16 '14 10:07 chachou29

what is the status of this issue ? I find the need of marking the editor as invalid as well.

scampi avatar Oct 20 '15 13:10 scampi

+1

cvharris avatar Jan 05 '16 17:01 cvharris

+1

bjaraujo avatar Jan 20 '16 14:01 bjaraujo

+1

dradovic avatar Mar 02 '16 15:03 dradovic

+1

dtseng123 avatar Apr 10 '16 02:04 dtseng123

+1

ConsM avatar Dec 14 '17 12:12 ConsM