-
Notifications
You must be signed in to change notification settings - Fork 169
Use $evalAsync instead of $apply to make sure ngModel gets updated once editor content changes #77
Conversation
|
Build failure was introduced before my change. |
|
👍 👍 |
|
Make sense! |
|
ui-ace declare a dependency on Angular |
|
@PowerKiKi I have updated angularjs dependency in bower.json and readme. The build is failing, I'll try to fix it. |
|
I am not sure what to think of that. Specifying a devDependency on @douglasduteil would you have an opinion on this ? |
|
Finally I figure this out. From Angular-mocks 1.3.1 (and AngularJS 1.3.x), we have to provide the @PowerKiKi I have just reverted |
|
Hi |
|
@douglasduteil good to know you can have a look at this repo. I'll keep updating this pr if I find better ways to get rid of build failure and this bug. |
Currently we are using
!scope.$$phase && !scope.$root.$$phaseto avoid to call$applyif there is already a digest loop running. ThengModelbinded to editor content would not get updated until users modify the content once again. If users try to access thengModelbinded to editor content, he would get an incorrect answer.We can push our
ngModelupdating task into$evalAsyncqueue.It would be executed before rendering the DOM and it won't conflict with digest loop.Attach angularjs event loop workflow.
Thanks.