aboutsummaryrefslogtreecommitdiffstats
path: root/docs/content/tutorial/step_04.ngdoc
diff options
context:
space:
mode:
authorBrian Ford2013-10-08 10:45:00 -0700
committerBrian Ford2013-10-08 10:49:33 -0700
commit556e8eece69b93b89c6ae1cc4cb86d08994a0dfc (patch)
treee797331ff844daf220327f43a0ad5a0a0bbe64f0 /docs/content/tutorial/step_04.ngdoc
parentd769b8b8f0fba81b35e441249e31e7e209d40580 (diff)
downloadangular.js-556e8eece69b93b89c6ae1cc4cb86d08994a0dfc.tar.bz2
docs(tutorial): fix style across tutorial steps
Diffstat (limited to 'docs/content/tutorial/step_04.ngdoc')
-rw-r--r--docs/content/tutorial/step_04.ngdoc25
1 files changed, 10 insertions, 15 deletions
diff --git a/docs/content/tutorial/step_04.ngdoc b/docs/content/tutorial/step_04.ngdoc
index 8cf429e1..2e92cfb2 100644
--- a/docs/content/tutorial/step_04.ngdoc
+++ b/docs/content/tutorial/step_04.ngdoc
@@ -65,25 +65,20 @@ necessary!
__`app/js/controllers.js`:__
<pre>
-function PhoneListCtrl($scope) {
+var phonecatApp = angular.module('phonecatApp', []);
+
+phonecatApp.controller('PhoneListCtrl', function PhoneListCtrl($scope) {
$scope.phones = [
- {"name": "Nexus S",
- "snippet": "Fast just got faster with Nexus S.",
- "age": 0},
- {"name": "Motorola XOOM™ with Wi-Fi",
- "snippet": "The Next, Next Generation tablet.",
- "age": 1},
- {"name": "MOTOROLA XOOM™",
- "snippet": "The Next, Next Generation tablet.",
- "age": 2}
+ {'name': 'Nexus S',
+ 'snippet': 'Fast just got faster with Nexus S.'},
+ {'name': 'Motorola XOOM™ with Wi-Fi',
+ 'snippet': 'The Next, Next Generation tablet.'},
+ {'name': 'MOTOROLA XOOM™',
+ 'snippet': 'The Next, Next Generation tablet.'}
];
$scope.orderProp = 'age';
-}
-
-var phonecatApp = angular.module('phonecatApp',[]);
-phonecatApp.controller('PhoneListCtrl', PhoneListCtrl);
-
+});
</pre>
* We modified the `phones` model - the array of phones - and added an `age` property to each phone