aboutsummaryrefslogtreecommitdiffstats
path: root/docs/content/tutorial/step_04.ngdoc
diff options
context:
space:
mode:
authorPete Bacon Darwin2013-10-03 11:58:47 +0100
committerPete Bacon Darwin2013-10-03 11:58:47 +0100
commit0f7237d764f37ab9916fc9b8ecb7d8cd5b6adf98 (patch)
tree9c28d15b5790e3db4a4ccc47903909b980fa68bb /docs/content/tutorial/step_04.ngdoc
parent575f63ac508a988e0c0ecbf93f62ea6f4bab13c0 (diff)
downloadangular.js-0f7237d764f37ab9916fc9b8ecb7d8cd5b6adf98.tar.bz2
docs(tutorial): improve wording and consistency
Diffstat (limited to 'docs/content/tutorial/step_04.ngdoc')
-rw-r--r--docs/content/tutorial/step_04.ngdoc10
1 files changed, 6 insertions, 4 deletions
diff --git a/docs/content/tutorial/step_04.ngdoc b/docs/content/tutorial/step_04.ngdoc
index 72ac70d5..8cf429e1 100644
--- a/docs/content/tutorial/step_04.ngdoc
+++ b/docs/content/tutorial/step_04.ngdoc
@@ -65,9 +65,7 @@ necessary!
__`app/js/controllers.js`:__
<pre>
-var myApp = angular.module('myApp',[]);
-
-myApp.controller('PhoneListCtrl', ['$scope', function($scope) {
+function PhoneListCtrl($scope) {
$scope.phones = [
{"name": "Nexus S",
"snippet": "Fast just got faster with Nexus S.",
@@ -81,7 +79,11 @@ myApp.controller('PhoneListCtrl', ['$scope', function($scope) {
];
$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