angular-medium-editor icon indicating copy to clipboard operation
angular-medium-editor copied to clipboard

Watch/ngChange triggered on initialization

Open shyamal890 opened this issue 8 years ago • 3 comments

Currently if the model is set to null || undefined ng-change and watch are triggered on initialization.

Most probably has to do with the following line of code: ngModel.editor.setContent(ngModel.$viewValue || "");

shyamal890 avatar Jul 19 '17 07:07 shyamal890

@thijsw would appreciate your input. Uncessary HTTP call is made to the server due to this.

shyamal890 avatar Sep 29 '17 08:09 shyamal890

I see, what do you propose we could change?

thijsw avatar Sep 29 '17 08:09 thijsw

I tried changing ngModel.editor.setContent(ngModel.$viewValue || ""); to ngModel.editor.setContent(ngModel.$viewValue); but it didn't have desired effect. Don't know what is causing this.

shyamal890 avatar Sep 29 '17 08:09 shyamal890