You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> The power of Meteor and the simplicity and eco-system of AngularJS
4
4
5
-
# New v0.6 - the biggest changes so far!
6
-
7
-
We just released angular-meteor version 0.6.0 with a lot of exciting new features, including new API's for collections, templates and routing. It does have some breaking changes too. You can read more on the details in the [release notes](https://github.com/Urigo/angular-meteor/releases/tag/0.6.0)
8
-
9
-
Update to the new version by running:
10
-
11
-
```bash
12
-
$ meteor update
13
-
```
14
-
15
5
## Please support our ng-conf 2015 talk proposal by commenting on it [here](https://github.com/ng-conf/submissions-2015/pull/172)
16
6
17
7
## Quick start
@@ -30,10 +20,7 @@ We would love contributions in:
30
20
31
21
1. Code
32
22
2.[Tutorial](http://angularjs.meteor.com/tutorial) - our goal with the tutorial is to add as many common tasks as possible. If you want to create and add your own chapter we would be happy to help you writing and adding it.
33
-
3.[External issues](https://github.com/Urigo/angular-meteor/issues/109) - help us push external issues that affect our community.
34
-
4.[Roadmap](https://trello.com/b/Wj9U0ulk/angular-meteor) - you can add a card about want you want to see in the library or in the tutorial.
35
-
36
-
We are also considering money compensation for contributors, more as a tribute then a profit for now.
23
+
3.[Roadmap](https://trello.com/b/Wj9U0ulk/angular-meteor) - you can add a card about want you want to see in the library or in the tutorial.
37
24
38
25
## Contributor Developer Setup
39
26
@@ -88,9 +75,9 @@ You don't need to bootstrap the application manually, simply specifying the `ng-
88
75
89
76
From angular-meteor version 0.6 you can use Angular's default template delimiters and there is no need to change them.
90
77
91
-
However, you need to write your Angular template markup in `.tpl` files, since Meteor won't look at those files as Spacebars templates. Tying HTML and `.tpl` files together isn't very difficult, we can simply use Angular's `ng-include`.
78
+
However, you need to write your Angular template markup in `.ng.html` files, since Meteor won't look at those files as Spacebars templates. Tying HTML and `.ng.html` files together isn't very difficult, we can simply use Angular's `ng-include`.
92
79
93
-
Please note that the names of the templates to Angular will be their URL as Meteor sees it when minifying the .tpl files. **Hence every template URL is relative to the root of the Meteor project, and contains no leading forward slash.** This is important to note when working with `ng-include` to include templates.
80
+
Please note that the names of the templates to Angular will be their URL as Meteor sees it when minifying the .ng.html files. **Hence every template URL is relative to the root of the Meteor project, and contains no leading forward slash.** This is important to note when working with `ng-include` to include templates.
94
81
95
82
`client/index.html`:
96
83
@@ -101,13 +88,13 @@ Please note that the names of the templates to Angular will be their URL as Mete
@@ -122,23 +109,23 @@ Please note that the names of the templates to Angular will be their URL as Mete
122
109
123
110
### Using Meteor Collections
124
111
125
-
angular-meteor provides 3-way data binding (view-client-server) by tying a Meteor collection to an Angular model. The API to accomplish this is [$meteorCollection](http://angularjs.meteor.com/api/meteorCollection).
112
+
angular-meteor provides 3-way data binding (view-client-server) by tying a Meteor collection to an Angular model. The API to accomplish this is [$meteor.collection](http://angularjs.meteor.com/api/meteorCollection).
126
113
127
114
```js
128
-
$scope.todos=$meteorCollection(Todos);
115
+
$scope.todos=$meteor.collection(Todos);
129
116
```
130
117
131
118
[More in step 3 of the tutorial](http://angularjs.meteor.com/tutorial/step_03)
132
119
133
120
### Subscribe
134
121
135
-
[$meteorSubscribe.subscribe](http://angularjs.meteor.com/api/subscribe) is a wrapper for `Meteor.subscribe` that returns a promise.
122
+
[$meteor.subscribe](http://angularjs.meteor.com/api/subscribe) is a wrapper for `Meteor.subscribe` that returns a promise.
136
123
137
124
Here's an example of how to tie a Meteor collection to a clean Angular model in the form of an array:
When adding controllers and the likes, remember to use [Dependency Injection](http://docs.angularjs.org/guide/di). This is common Angular practice and helps you avoid problems when minifying and obfuscating code.
You no longer need to use the special [urigo:angular-ui-router](https://github.com/Urigo/meteor-angular-ui-router)package. Instead, you can include [angular-ui-router](https://github.com/angular-ui/ui-router) either with Bower by using [mquandalle:bower](https://atmospherejs.com/mquandalle/bower) or manually by downloading it and injecting it with dependency injection like you would with any other Angular module.
156
+
Use to official AngularUI ui-router Meteor package - [angularui:angular-ui-router](https://atmospherejs.com/angularui/angular-ui-router)
170
157
171
158
More on how to actually use angular-ui-router in [step 5 of the tutorial](http://angularjs.meteor.com/tutorial/step_05)
172
159
@@ -184,7 +171,7 @@ You can include Meteor's native templates with the [meteor-include](http://angul
184
171
185
172
#### Caveat regarding <meteor-include>
186
173
187
-
The 0.6 release relies more heavily on Angular's default templating system and it is now usually recommended that you use `ng-include` over `meteor-include`. This is because you can't use Angular's template delimiters directly within Meteor templates and you would still need to use an `ng-include` directive to include any Angular template markup in your Meteor templates.
174
+
Since 0.6 release, angular-meteor relies more heavily on Angular's default templating system and it is now usually recommended that you use `ng-include` over `meteor-include`. This is because you can't use Angular's template delimiters directly within Meteor templates and you would still need to use an `ng-include` directive to include any Angular template markup in your Meteor templates.
188
175
189
176
Although it is possible to combine the two systems for including templates, using one of them to the furthest extent possible helps us avoid the recipe for headaches that is unnecessarily deep template hierarchies.
190
177
@@ -201,20 +188,20 @@ $rootScope.loggingIn; // true if a Meteor login method is currently in progress
201
188
202
189
### Meteor methods with promises
203
190
204
-
[$meteorMethods](http://angularjs.meteor.com/api/methods) calls a Meteor method and returns a promise.
191
+
[$meteor.call](http://angularjs.meteor.com/api/methods) calls a Meteor method and returns a promise.
0 commit comments