Trigger digest when Subscription ready changes #1655
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Sorry, but I wasn't really able to wrap my head around how to test this feature ...
In my example, I wanted to call the
ready()method of a subscription directly in the HTML template of my AngularJS app. This change now makes this possible by running the $digest cycle every time the ready-property of a subscription (and thereby also the response of theready()method) changes.My first attempt included a call of
ready(), but this broke an existing test, where you rely on calling theready()method. Therefore I changed it to use the meteor-internal property_subscriptionsto directly access the ready-computation for this subscription.The autorun I added is registered as a dependency of the outer autorun and will be stopped once the outer autorun is called again.
Looking forward to your response. I'll already start using this in my project.