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
Copy file name to clipboardExpand all lines: .docs/angular-meteor/client/views/steps/tutorial.step_02.tpl
+7-8Lines changed: 7 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ With that in mind, let's use a little Angular and JavaScript to add model, view,
33
33
34
34
Goals for this step:
35
35
36
-
* The list of three parties is now generated dynamically from data in the model of the client
36
+
* Generate the parties list dynamically from data in a model (client only for now).
37
37
38
38
39
39
# View and Template
@@ -98,7 +98,7 @@ The controller is simply a constructor function that takes a $scope parameter.
98
98
99
99
The data model (a simple array of parties in object literal notation) is now instantiated within the PartiesListCtrl controller.
100
100
101
-
Although the controller is not yet doing very much, it plays a crucial role. By providing context for our data model, the controller allows us to establish data-binding between the model and the view. We connected the dots between the presentation, data, and logic components as follows:
101
+
Although the controller is not yet doing very much, it plays a crucial role. By providing context for our data model, the controller allows us to establish data-binding between the model and the view. We connected the dots between the presentation, the data, and the logic components as follows:
102
102
103
103
* The ngController directive, located on the body tag, references the name of our controller, PartiesListCtrl (located in the JavaScript file app.js).
104
104
@@ -119,12 +119,11 @@ As you can see, when we declared the controller, we used strings for [dependency
119
119
// ...
120
120
}]);
121
121
122
-
There is a very popular Angular tool that's called [ng-annotate](https://github.com/olov/ng-annotate) that takes care of that for us so we can write regular code like it's not
123
-
going through minification.
122
+
There is a very popular Angular tool that's called [ng-annotate](https://github.com/olov/ng-annotate) that takes care of that for us so we can write regular code that won't get mangled in minification.
124
123
125
-
angular-meteor uses that process automatically. all you need to do is to change your .js files endings to .ng.js
124
+
angular-meteor uses that process automatically. All you need to do is to change your .js files to end with .ng.js
126
125
127
-
then you can write your dependency injection like this:
126
+
Then you can write your dependency injection like this:
@@ -143,7 +142,7 @@ Add another binding to index.ng.html , For example:
143
142
144
143
<btf-markdown>
145
144
146
-
Create a new model property in the controller (inside app.js) and bind to it from the template. For example:
145
+
Create a new model property in the controller (inside app.js) and bind to it in the template. For example:
147
146
148
147
$scope.name = "World";
149
148
@@ -186,7 +185,7 @@ Extra points: try and make an 8x8 table using an additional ng-repeat.
186
185
187
186
You now have a dynamic app that features separate model, view, and controller components.
188
187
189
-
But, this is all client side, which is nice for tutorials, but in a real application we need to save the data in a DB on the server and sync all the clients with it.
188
+
But, this is all client side, which is nice for tutorials, but in a real application we need to persist the data on the server and sync all the clients with it.
190
189
191
190
So, let's go to step 3 to learn how to bind ourselves to the great power of Meteor.
0 commit comments