From 2037facc998b4da2bbb2b62690faf4d970470c12 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Wed, 11 Apr 2012 17:00:26 -0700 Subject: docs(tutorial): update step-04 to v1.0 --- docs/content/tutorial/step_04.ngdoc | 42 +++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 20 deletions(-) (limited to 'docs/content/tutorial/step_04.ngdoc') diff --git a/docs/content/tutorial/step_04.ngdoc b/docs/content/tutorial/step_04.ngdoc index ebeb7cca..39e8eeec 100644 --- a/docs/content/tutorial/step_04.ngdoc +++ b/docs/content/tutorial/step_04.ngdoc @@ -2,8 +2,6 @@ @name Tutorial: 4 - Two-way Data Binding @description -
{{phone.snippet}}
 +
+       -* We then chained the `$filter` method with {@link api/angular.module.ng.$filter.orderBy `$orderBy`} method to
-further process the input into the repeater. `$orderBy` is a utility method similar to {@link
-api/angular.module.ng.$filter.filter `$filter`}, but instead of filtering an array, it reorders it.
+* We then chained the `filter` filter with {@link api/angular.module.ng.$filter.orderBy `orderBy`}
+filter to further process the input into the repeater. `orderBy` is a filter that takes an input
+array, copies it and reorders the copy which is then returned.
 
 Angular creates a two way data-binding between the select element and the `orderProp` model.
-`orderProp` is then used as the input for the `$orderBy` method.
+`orderProp` is then used as the input for the `orderBy` filter.
 
 As we discussed in the section about data-binding and the repeater in step 3, whenever the model
 changes (for example because a user changes the order with the select drop down menu), Angular's
@@ -76,8 +74,8 @@ __`app/js/controller.js`:__
 
-* We then chained the `$filter` method with {@link api/angular.module.ng.$filter.orderBy `$orderBy`} method to
-further process the input into the repeater. `$orderBy` is a utility method similar to {@link
-api/angular.module.ng.$filter.filter `$filter`}, but instead of filtering an array, it reorders it.
+* We then chained the `filter` filter with {@link api/angular.module.ng.$filter.orderBy `orderBy`}
+filter to further process the input into the repeater. `orderBy` is a filter that takes an input
+array, copies it and reorders the copy which is then returned.
 
 Angular creates a two way data-binding between the select element and the `orderProp` model.
-`orderProp` is then used as the input for the `$orderBy` method.
+`orderProp` is then used as the input for the `orderBy` filter.
 
 As we discussed in the section about data-binding and the repeater in step 3, whenever the model
 changes (for example because a user changes the order with the select drop down menu), Angular's
@@ -76,8 +74,8 @@ __`app/js/controller.js`:__
 
 /* App Controllers */
 
-function PhoneListCtrl() {
-  this.phones = [{"name": "Nexus S",
+function PhoneListCtrl($scope) {
+  $scope.phones = [{"name": "Nexus S",
                   "snippet": "Fast just got faster with Nexus S.",
                   "age": 0},
                  {"name": "Motorola XOOMâ„¢ with Wi-Fi",
@@ -87,7 +85,7 @@ function PhoneListCtrl() {
                   "snippet": "The Next, Next Generation tablet.",
                   "age": 2}];
 
-  this.orderProp = 'age';
+  $scope.orderProp = 'age';
 }
 
 
@@ -95,8 +93,8 @@ function PhoneListCtrl() {
 record. This property is used to order phones by age.
 
 * We added a line to the controller that sets the default value of `orderProp` to `age`. If we had
-not set the default value here, angular would have used the value of the first `