-
Notifications
You must be signed in to change notification settings - Fork 173
Changing value on the $scope not updating the editor? #64
Comments
+1 |
+1 |
+1 |
I still have this issue, using the latest version 0.2.3. I have a uib-tabset, and in tab no.1 I have a ui-ace div where I type text to update the ng-model. In tab no.2, I have a readonly ui-ace div that should reflect what I have changed because it has the same ng-model as the first. When I switch to tab no.2, the ui-ace does not update until I click into it or trigger other events like a tooltip hover over outside of the tabset, etc. If I place the readonly ui-ace input in tab no.1, however, it updates just fine. If I place the ng-model variable in between {{}} in tab no.2, it updates just fine. So, I think it is a similar issue discussed in this thread. I am aware of this issue with tabsets: http://stackoverflow.com/questions/27513462/angularjs-ngmodel-doesnt-work-inside-a-ui-bootstrap-tabset |
An fyi, I managed to temporarily fix the issue with a hack where I call a $timeout( function() { $rootScope.$broadcast('update-ace-editor-hack'); } ) upon clicking tab no.2 so that the editor receives an event to trigger its refresh. Edit: actually, it seems that all that isn't even necessary - just putting ng-click directive on the uib-tab element triggers the refresh itself. |
before find a better solution,I fixed in this way. and use $scope.aceEditor.setValue(newValue) to trigger the refresh; |
This is not solved! Thank you judytrinh for the hack! But for me the broadcast was necessary as well. |
I met with this problem too,and I used |
Hi,
I was a bit surprised to find out that when I update the $scope variable, the editor does not update.
Do I need to call some update method? Does that mean I need to save the editor from the onLoad event? Or is there something I can inject into my controller?
I'm wondering why this is not built-in.
Thanks
The text was updated successfully, but these errors were encountered: