From e12fb515f5ee017e36950ea92763eda8c40e9d34 Mon Sep 17 00:00:00 2001 From: victorbjelkholm Date: Mon, 14 Oct 2013 23:25:00 +0200 Subject: [PATCH] docs(tutorial): change controllers to not have name twice Naming both the controller and the function passed in to it with the controller name both seems unessecery and confusing to beginners. This commit removes the name from the function, as it is in the rest of the docs. --- docs/content/tutorial/step_02.ngdoc | 2 +- docs/content/tutorial/step_04.ngdoc | 2 +- docs/content/tutorial/step_05.ngdoc | 6 +++--- docs/content/tutorial/step_07.ngdoc | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/content/tutorial/step_02.ngdoc b/docs/content/tutorial/step_02.ngdoc index cfa45ee2b2f5..8b54ddc5b822 100644 --- a/docs/content/tutorial/step_02.ngdoc +++ b/docs/content/tutorial/step_02.ngdoc @@ -81,7 +81,7 @@ __`app/js/controllers.js`:__ var phonecatApp = angular.module('phonecatApp', []); -phonecatApp.controller('PhoneListCtrl', function PhoneListCtrl($scope) { +phonecatApp.controller('PhoneListCtrl', function ($scope) { $scope.phones = [ {'name': 'Nexus S', 'snippet': 'Fast just got faster with Nexus S.'}, diff --git a/docs/content/tutorial/step_04.ngdoc b/docs/content/tutorial/step_04.ngdoc index 5adf783f03a7..df1b23ec7e9f 100644 --- a/docs/content/tutorial/step_04.ngdoc +++ b/docs/content/tutorial/step_04.ngdoc @@ -67,7 +67,7 @@ __`app/js/controllers.js`:__
 var phonecatApp = angular.module('phonecatApp', []);
 
-phonecatApp.controller('PhoneListCtrl', function PhoneListCtrl($scope) {
+phonecatApp.controller('PhoneListCtrl', function ($scope) {
   $scope.phones = [
     {'name': 'Nexus S',
      'snippet': 'Fast just got faster with Nexus S.',
diff --git a/docs/content/tutorial/step_05.ngdoc b/docs/content/tutorial/step_05.ngdoc
index fce100b0f8f2..7b167ff3f6fa 100644
--- a/docs/content/tutorial/step_05.ngdoc
+++ b/docs/content/tutorial/step_05.ngdoc
@@ -56,7 +56,7 @@ __`app/js/controllers.js:`__
 
 var phonecatApp = angular.module('phonecatApp', []);
 
-phonecatApp.controller('PhoneListCtrl', function PhoneListCtrl($scope, $http) {
+phonecatApp.controller('PhoneListCtrl', function ($scope, $http) {
   $http.get('phones/phones.json').success(function(data) {
     $scope.phones = data;
   });
@@ -79,7 +79,7 @@ json response and parsed it for us!
 To use a service in angular, you simply declare the names of the dependencies you need as arguments
 to the controller's constructor function, as follows:
 
-    function PhoneListCtrl($scope, $http) {...}
+    phonecatApp.controller('PhoneListCtrl', function ($scope, $http) {...}
 
 Angular's dependency injector provides services to your controller when the controller is being
 constructed. The dependency injector also takes care of creating any transitive dependencies the
@@ -145,7 +145,7 @@ __`app/js/controllers.js:`__
 var phonecatApp = angular.module('phonecatApp', []);
 
 phonecatApp.controller('PhoneListCtrl', ['$scope', '$http',
-  function PhoneListCtrl($scope, $http) {
+  function ($scope, $http) {
     $http.get('phones/phones.json').success(function(data) {
       $scope.phones = data;
     });
diff --git a/docs/content/tutorial/step_07.ngdoc b/docs/content/tutorial/step_07.ngdoc
index c519751ca7ee..fece66676fbe 100644
--- a/docs/content/tutorial/step_07.ngdoc
+++ b/docs/content/tutorial/step_07.ngdoc
@@ -149,7 +149,7 @@ __`app/js/controllers.js`:__
 var phonecatControllers = angular.module('phonecatControllers', []);
 
 phonecatControllers.controller('PhoneListCtrl', ['$scope', '$http',
-  function PhoneListCtrl($scope, $http) {
+  function ($scope, $http) {
     $http.get('phones/phones.json').success(function(data) {
       $scope.phones = data;
     });