From f7bbba882dd6220f130e0befa674bc343d29ff69 Mon Sep 17 00:00:00 2001 From: vangorra Date: Tue, 12 Jan 2016 18:19:50 -0800 Subject: [PATCH] Adding subscribe method to meteor angular IScope. --- angular-meteor/angular-meteor.d.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/angular-meteor/angular-meteor.d.ts b/angular-meteor/angular-meteor.d.ts index 6df5bc63d2..e536e32030 100644 --- a/angular-meteor/angular-meteor.d.ts +++ b/angular-meteor/angular-meteor.d.ts @@ -51,6 +51,16 @@ declare module angular.meteor { * @return This method returns this, which the the reactive context, in order to provide the ability to chain the logic. */ helpers(definitions : { [helperName : string] : () => Mongo.Cursor }): IScope; + + /** + * This method is a wrapper of Tracker.autorun and shares exactly the same API. + * The autorun method is part of the ReactiveContext, and available on every context and $scope. + * The argument of this method is a callback, which will be called each time Autorun will be used. + * The Autorun will stop automatically when when it's context ($scope) is destroyed. + * + * @param runFunc - The function to run. It receives one argument: the Computation object that will be returned. + */ + autorun(runFunc : () => void) : Tracker.Computation; } /**