Previous code would generate "$rootScope:inprog" AngularJS error (see
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
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
Related to #64. Hopefully we can stop relying on AngularJS soon, and
this potential problem can go away/wouldn't have happened.