From 556e8eece69b93b89c6ae1cc4cb86d08994a0dfc Mon Sep 17 00:00:00 2001 From: Brian Ford Date: Tue, 8 Oct 2013 10:45:00 -0700 Subject: docs(tutorial): fix style across tutorial steps --- docs/content/tutorial/step_02.ngdoc | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'docs/content/tutorial/step_02.ngdoc') diff --git a/docs/content/tutorial/step_02.ngdoc b/docs/content/tutorial/step_02.ngdoc index 16dbe366..539c541b 100644 --- a/docs/content/tutorial/step_02.ngdoc +++ b/docs/content/tutorial/step_02.ngdoc @@ -79,28 +79,27 @@ the `PhoneListCtrl` __controller__. The __controller__ is simply a constructor f __`app/js/controllers.js`:__
-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."},
- {"name": "Motorola XOOM™ with Wi-Fi",
- "snippet": "The Next, Next Generation tablet."},
- {"name": "MOTOROLA XOOM™",
- "snippet": "The Next, Next Generation tablet."}
+ {'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.'}
];
-}
-
-var phonecatApp = angular.module('phonecatApp',[]);
-phonecatApp.controller('PhoneListCtrl', PhoneListCtrl);
+});
-Here we have declared a controller called __PhoneListCtrl__ and registered it in an AngularJS
+Here we declared a controller called __PhoneListCtrl__ and registered it in an AngularJS
module, `phonecatApp`. Notice that our `ng-app` directive (on the `` tag) now specifies the `phonecatApp`
module name as the module to load when bootstrapping the Angular application.
-Although the controller is not yet doing very much controlling, it is playing a crucial role. By
-providing context for our data model, the controller allows us to establish data-binding between
+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:
--
cgit v1.2.3