Hi, I'm currently developing an AngularJS app using ES6 + Traceur using
async functions, something like
async doSomething()
{
this.someVar = await somePromiseService.someFunction();
this.SomeBindingVarInMyView = this.someVar.someProperty;
}
<view>{{ controller.SomeBindingVarInMyView }} </view>
This code will only work if I add $scope.apply() after assigning
this.SomeBindingVarInMyView value. I guess this is expected because async
functions will get the value later on another JS tick and the scope digest
was terminated previously, so my question is, is there a way to automate
this without requiring to call apply() on all async functions?
Thanks
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.