Skip to content

Commit

Permalink
Merge pull request #1 from Urigo/master
Browse files Browse the repository at this point in the history
rebase
  • Loading branch information
oshai committed Jul 6, 2015
2 parents 55f135a + 4c9a89d commit 5fc7e9f
Show file tree
Hide file tree
Showing 96 changed files with 1,925 additions and 537 deletions.
6 changes: 4 additions & 2 deletions .docs/angular-meteor/client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
<ul class="nav navbar-nav navbar-left">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Learn <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="https://github.com/Urigo/meteor-angular-socially#angular-meteor-university-"><strong>angular-meteor university</strong></a></li>
<ul class="dropdown-menu tutorial-dropdown" role="menu">
<li><a href="https://github.com/Urigo/meteor-angular-socially#angular-meteor-university-"><strong>Angular-Meteor University</strong></a></li>
<li><a href="/tutorial"><strong>Tutorial - From start to full app</strong></a></li>
<li><a href="/tutorial/step_00">0. Bootstrapping</a></li>
<li><a href="/tutorial/step_01">1. Static Template</a></li>
Expand All @@ -68,6 +68,8 @@
<li><a href="/tutorial/step_16">16. Google Maps</a></li>
<li><a href="/tutorial/step_17">17. CSS, LESS and Bootstrap</a></li>
<li><a href="/tutorial/step_18">18. angular-material</a></li>
<li><a href="/tutorial/step_19">19. Third-Party packages</a></li>
<li><a href="/tutorial/step_20">20. Handling files with CollectionFS</a></li>
</ul>
</li>
<li><a href="/api">API Reference</a></li>
Expand Down
8 changes: 6 additions & 2 deletions .docs/angular-meteor/client/routes.ng.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ angular.module("meteor-angular-docs").config(
url: '/meteor-include',
template: UiRouter.template('api.meteor-include.html')
})
.state('api.collectionfs', {
url: '/collectionfs',
.state('api.files', {
url: '/files',
template: UiRouter.template('api.collectionfs.html')
})
.state('api.utils', {
Expand Down Expand Up @@ -203,6 +203,10 @@ angular.module("meteor-angular-docs").config(
url: '/step_19',
template: UiRouter.template('tutorial.step_19.html')
})
.state('tutorial.step20', {
url: '/step_20',
template: UiRouter.template('tutorial.step_20.html')
})
.state('tutorial.next_steps', {
url: '/next_steps',
template: UiRouter.template('tutorial.next_steps.html')
Expand Down
10 changes: 10 additions & 0 deletions .docs/angular-meteor/client/styles/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ hr {
}
}

header {
.nav {
.tutorial-dropdown {
columns: 2;
-webkit-columns: 2;
-moz-columns: 2;
}
}
}

main{
padding: 4rem 0;
}
Expand Down
2 changes: 1 addition & 1 deletion .docs/angular-meteor/client/views/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h2><a href="/api">API</a></h2>
<li><a href="/api/auth">User Authentication</a></li>
<li><a href="/api/getReactively">$scope.getReactively</a></li>
<li><a href="/api/meteor-include">meteor-include directive</a></li>
<li><a href="/api/collectionfs">CollectionFS</a></li>
<li><a href="/api/files">CollectionFS</a></li>
<li><a href="/api/utils">$meteorUtils</a></li>
<li><a href="/api/camera">$meteorCamera</a></li>
<li><a href="/api/session">$meteor.session.bind</a></li>
Expand Down
26 changes: 18 additions & 8 deletions .docs/angular-meteor/client/views/api/api.AngularMeteorObject.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@ <h3><p><code><span class="pln">save( :doc );</span></code></p></h3>
<a href="" class="label type-hint type-hint-string">empty</a>/
<a href="" class="label type-hint type-hint-object">object</a>
</td>
<td><p>The doc to save to the Meteor Object.
If nothing is passed, the method saves everything in the AngularMeteorObject as is. Unchanged properties will be overridden with their existing values, which may trigger hooks.</p>
<p>
If doc is passed, the method only updates the Meteor Object with the properties passed, and no other changes will be saved.
</p>
<td><p> Document properties to save to the meteor object data. </p>

</td>
<td><a href="" class="label type-hint type-hint-object">No</a></td>
</tr>
</tbody>
</table>

Returns a promise with an error in case for an error or a number of successful docs changed in case of success.
If a document is passed, the method will only update nothing is passed, the Meteor Object with the properties passed, and no other changes will be saved.
If no document argument is passed, the method saves all current data on the AngularMeteorObject.
Even unchanged properties will be overridden with their current values, hence hooks may be triggered on them.
Returns a promise with value of 1 when successful (this is the number of docs successfully updated) or an error.

<br>
<h3><p><code><span class="pln">reset();</span></code></p></h3>
Expand All @@ -67,7 +67,7 @@ <h3><p><code><span class="pln">subscribe( :subscriptionName );</span></code></p>

A shorten (Syntactic sugar) function for the <a href="/api/subscribe">$meteor.subscribe function</a>.

Takes only one parameter and not returns a promise like <a href="/api/subscribe">$meteor.subscribe</a> does.
The function takes only one parameter and does not return a promise like <a href="/api/subscribe">$meteor.subscribe</a> does.

When called after $scope.meteorObject, it acts the same but in addition it automatically closes the subscription when the scope is destroyed.

Expand All @@ -90,19 +90,29 @@ <h3><p><code><span class="pln">subscribe( :subscriptionName );</span></code></p>
</td>
<td><p>The subscription name to subscribe to. exactly like the first parameter in $meteor.subscribe service.
</p></td>
<td><a href="" class="label type-hint type-hint-object">Yes</a></td>
<td><a href="" class="label type-hint type-hint-array">Yes</a></td>
</tr>
</tbody>
</table>

<br>
<h3><p><code><span class="pln">getRawObject();</span></code></p></h3>
#### Parameters
None

Returns a copy of the AngularMeteorObject with all the AngularMeteor-specific
internal properties removed. The returned object is then safe to use as a parameter
for <a href="/api/methods">method calls</a>, or anywhere else where the data needs
to be converted to JSON.

<br>
<h3><p><code><span class="pln">stop();</span></code></p></h3>
#### Parameters
None

Stops watching the object for changes.


----


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# $scope.getReactively

A method to get a $scope variable and watch it reactivly
A method to get a $scope variable and watch it reactively

----

Expand Down
25 changes: 16 additions & 9 deletions .docs/angular-meteor/client/views/api/api.meteorCollection.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,24 @@
<do-nothing>
{{#markdown}}

# $meteor.collection / $scope.$meteorCollection
# $meteor.collection / $scope.$meteorCollection

A service that wraps the [Meteor collections](http://docs.meteor.com/#/full/collections) to enable reactivity within AngularJS.
This service binds between the angularjs $scope variables and the meteor collection. Service binding include 3 parts:
- watching the changes in angular $scope and updating the meteor collection. (called "autobind")
- watching hte changes in the meteor collection and updating the angular $scope varialbles (called "observe").
A service that wraps the [Meteor collections](http://docs.meteor.com/#/full/collections) to enable reactivity within Angular.

The autobinding is optional, and can be set to false, so changes in the angular $scope varialbles will have to be explictly saved to the collection to be updated to the meteor collection.
The AngularMeteor collection can be explicitly stopped by calling the stop() function. It important to stop the collection to avoid the increase in number of watchers.
Calling $scope.$meteorCollection is exactly the same as calling $meteor.collection but additionally it will automatically stop the collection when the scope is destroyed.
Therefore it is recommended to use $scope.$meteorCollection.
This service binds between the Angular `$scope` variables and the meteor collection.

Service binding include 3 parts:

* watching the changes in **Angular $scope** and updating the **Meteor Collection**. (called "autobind")
* watching hte changes in the **Meteor Collection** and updating the **Angular $scope** variables (called "observe")

The autobinding is optional, and can be set to false, so changes in the Angular $scope variables will have to be explicitly saved to the collection to be updated to the Meteor Collection.

The AngularMeteor collection can be explicitly stopped by calling the `stop()` function. It is important to stop the collection to avoid the increase in number of watchers.

Calling `$scope.$meteorCollection` is exactly the same as calling `$meteor.collection` but additionally it will automatically stop the collection when the scope is destroyed.

Therefore **using `$scope.$meteorCollection` is recommended use** over `$meteor.collection`.

----

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
Finds the first document that matches the selector, as ordered by sort and skip options.
Wraps [collection.findOne](http://docs.meteor.com/#/full/findone)

Calling $scope.$meteorObject is exactly the same but additionally it will automatically stop the object when the scope is destroyed; therefore this is the recommended method.
Calling `$scope.$meteorObject` is exactly the same but additionally it will automatically stop the object when the scope is destroyed; therefore this is the **recommended method**.

----

Expand Down
17 changes: 5 additions & 12 deletions .docs/angular-meteor/client/views/steps/tutorial.intro.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,19 @@
{{#markdown}}
# Socially - A Meteor-Angular Tutorial App

This tutorial serves as a comprehensive introduction to writing applications with Meteor and AngularJS.
This tutorial serves as a comprehensive introduction to writing applications with Meteor and Angular.

We will tap into the power of both frameworks and their eco-systems to write quality applications in a fraction of the time.

No previous knowledge in Angular or Meteor is necessary.

We will walk you through building an Angular-Meteor app. Can't wait to see it? Here's the final version - [http://socially-step18.meteor.com/](http://socially-step18.meteor.com/). Don't forget to come back and go through this tutorial!

You can also participate in our free angular-meteor university and do the step by step exercises together with community members.
Read more about the angular-meteor university [here](https://github.com/Urigo/meteor-angular-socially#angular-meteor-university-).

See how AngularJS makes the browser smarter, while making your application code smaller and easier.

Also how powerful Meteor is, with it's Distributed Data Protocol (it's like "REST for websockets") and latency compensation.

We will also tap into the huge eco-systems of each of these frameworks. Which will allow us to write quality applications in a fraction of the time.

Our goal in this tutorial is to add more steps as we go along and to cover as many use cases as possible. So if there's a use case you think is missing, please suggest it on the [Github issues page](https://github.com/Urigo/angular-meteor/issues).

We also welcome pull requests for new chapters, we would love to work with you on them!
We also welcome pull requests for new chapters and would love to work with you on them!

Enjoy!
Lets start!

{{/markdown}}
</do-nothing>
Expand Down

0 comments on commit 5fc7e9f

Please sign in to comment.