Skip to content

Commit 6e41707

Browse files
committed
Merge branch 'master' into auth
2 parents 76472f3 + 047b4e9 commit 6e41707

File tree

5 files changed

+538
-963
lines changed

5 files changed

+538
-963
lines changed

docs/angular-meteor/both/router/router.js

+6-9
Original file line numberDiff line numberDiff line change
@@ -166,27 +166,24 @@ Router.map(function () {
166166

167167
for (var coreAPI in currentApi.groups[0].pages) {
168168
var routeName = currentApi.groups[0].pages[coreAPI].route;
169-
routeName = routeName.slice(routeName.lastIndexOf('.')+1);
169+
routeName = routeName.slice(routeName.lastIndexOf('.') + 1);
170170
var redirectFrom = '/api/' + routeName;
171171
var redirectTo = '/api/' + apiKey + '/' + routeName;
172-
if (!_.contains(directedRouteNames, routeName)){
172+
if (!_.contains(directedRouteNames, routeName)) {
173173
redirect(redirectFrom, redirectTo);
174174
directedRouteNames.push(routeName);
175175
}
176176
}
177177

178178
createSubRoutes(currentApi);
179179

180-
(function(routeUrl) {
180+
(function (routeUrl) {
181181
if (routeUrl) {
182-
if (apiKey != DEFAULT_API) {
183-
Router.route('/api/' + apiKey, function () {
184-
this.redirect(routeUrl);
185-
});
186-
}
182+
Router.route('/api/' + apiKey, function () {
183+
this.redirect(routeUrl);
184+
});
187185
}
188186
})(currentApi.groups[0].redirectRoute);
189-
190187
}
191188

192189
redirect('/api', '/api/' + DEFAULT_API + '/helpers');

docs/angular-meteor/client/content/api-reference/1.3.1/api.ngFileExtension.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
----
2121

22-
> Since version 1.2.0 and above, the default behaviour with is using Angular compilation for regular `html` and `js` files.
22+
> Since version 1.2.0 and above, the default behaviour which is using Angular compilation for regular `html` and `js` files.
2323

2424
> You just need to `meteor remove blaze-html-templates ecmascript`
2525

docs/angular-meteor/client/content/tutorials/socially/angular1/tutorials.socially.angular1.step_12.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,19 @@ Let's get back to our client code. We now need to change our subscribe call with
3737
What are those parameters that we want to set on the options argument? In order to have pagination in our
3838
parties list we will need to save the current page, the number of parties per page and the sort order. So let's add these parameters to our component in `parties-list.component.js` file.
3939

40-
We will add the `perPage` variable as a regular variable, but the `page` and `sort` variables will later effect our subscription and we want the subscription to re-run every time one of them changes.
41-
42-
Because of that, they will need to be [Reactive Vars](http://docs.meteor.com/#/full/reactivevar_pkg). To do that we need to defined them with `helpers`:
40+
We will `perPage`, `page` and `sort` variables will later effect our subscription and we want the subscription to re-run every time one of them changes.
4341

4442
{{> DiffBox tutorialName="meteor-angular1-socially" step="12.2"}}
4543

46-
That means that `$scope.perPage` won't be reactive and Meteor won't re-run anything based on that, but `$scope.page` and `$scope.sort` are reactive and Meteor will re-run the subscription every time one of them will change.
47-
4844
Right now, we just use `subscribe` without any parameters, but we need to provide some arguments to the subscriptions.
4945

5046
In order to do that, we will add a second parameter to the `subscribe` method, and we will provide a function that returns an array of arguments for the subscription.
5147

48+
We will use `getReactively` in order to get the current value, and this will also make them Reactive variables, and every change of them will effect the subscription parameters.
49+
5250
{{> DiffBox tutorialName="meteor-angular1-socially" step="12.3"}}
5351

54-
> Note that we also moved the `subscribe` to be after the `helpers`, because we use the variables that we defined in the `helpers` block, and we want them to be defined from the beginning.
52+
That means that `this.page` and `this.sort` are now reactive and Meteor will re-run the subscription every time one of them will change.
5553

5654
Now we've built an object that contains 3 properties:
5755

@@ -63,7 +61,7 @@ Now we also need to add the sort modifier to the way we get the collection data
6361
That is because the sorting is not saved when the data is sent from the server to the client.
6462
So to make sure our data is also sorted on the client, we need to define it again in the parties collection.
6563

66-
To do that we are going to add the `this.sort` to the collection helper:
64+
To do that we are going to add the `sort` variable, and use it again with `getReactively`, in order to run the helper each time the `sort` changes:
6765

6866
{{> DiffBox tutorialName="meteor-angular1-socially" step="12.4"}}
6967

0 commit comments

Comments
 (0)