Skip to content

Commit 44f78bf

Browse files
committed
(docs): Example of using scope inside meteor-include, fixes Urigo#333
1 parent a10bcd9 commit 44f78bf

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

.docs/angular-meteor/client/views/api/api.meteor-include.html

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@
5656

5757

5858
The `meteor-include` directive holds the Angular scope of the directive as the
59-
as [Template.currentData](http://docs.meteor.com/#/full/template_currentdata) of the Meteor template,
60-
names it `$scope` and update it reactively.
59+
as [Template.currentData](http://docs.meteor.com/#/full/template_currentdata) of the Meteor template.
6160

6261

6362
#### Example using scope data
@@ -116,16 +115,9 @@ <h1>Inside Angular</h1>
116115

117116
}]);
118117

119-
Template.partiesBlazeTemplate.onCreated(function () {
120-
// getAngularScope is a helper function supplied by angular-meteor
121-
getAngularScope(this);
122-
});
123-
124118
Template.partiesBlazeTemplate.helpers({
125119
parties: function() {
126-
// Make sure scope is already defined as Blaze loads before Angular
127-
if (Template.instance().$scope)
128-
return Template.instance().$scope.parties
120+
return Template.currentData().getReactively('parties', true);
129121
}
130122
});
131123
}

0 commit comments

Comments
 (0)