Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
playground: Make format synchronous.
Previous code would generate "$rootScope:inprog" AngularJS error (see https://docs.angularjs.org/error/$rootScope/inprog). I'm not fully sure what changed to cause that, but it seems this code can now be executed synchronously without a goroutine (i.e., it makes no blocking calls). According to AngularJS documentation (linked above), that is one possible cause of this error: > This error is often seen when interacting with an API that is sometimes sync and sometimes async. Perhaps something changed to cause formatting to no longer by asynchronous. Remove the goroutine and scope.Apply calls. It seems to work, but I'm not familiar with AngularJS enough to be confident this is the best thing to do. I'm also not sure what exactly changed to trigger the original error. Related to #64. Hopefully we can stop relying on AngularJS soon, and this potential problem can go away/wouldn't have happened.
- Loading branch information