From a61d7999a4857871c2e2f73760d85ca6ab747858 Mon Sep 17 00:00:00 2001 From: Brian Ford Date: Fri, 11 Oct 2013 16:04:20 -0700 Subject: docs(tutorial/step08): use DI annotations --- docs/content/tutorial/step_08.ngdoc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'docs') diff --git a/docs/content/tutorial/step_08.ngdoc b/docs/content/tutorial/step_08.ngdoc index 5075be98..968c9add 100644 --- a/docs/content/tutorial/step_08.ngdoc +++ b/docs/content/tutorial/step_08.ngdoc @@ -61,12 +61,14 @@ the same way as the phone list controller. __`app/js/controllers.js`:__
-var phonecatApp = angular.module('phonecatApp',[]);
-phonecatApp.controller('PhoneDetailCtrl', ['$scope', '$routeParams', '$http', function($scope, $routeParams, $http) {
-  $http.get('phones/' + $routeParams.phoneId + '.json').success(function(data) {
-    $scope.phone = data;
-  });
-}]);
+var phonecatControllers = angular.module('phonecatControllers',[]);
+
+phonecatControllers.controller('PhoneDetailCtrl', ['$scope', '$routeParams', '$http',
+  function($scope, $routeParams, $http) {
+    $http.get('phones/' + $routeParams.phoneId + '.json').success(function(data) {
+      $scope.phone = data;
+    });
+  }]);
 
To construct the URL for the HTTP request, we use `$routeParams.phoneId` extracted from the current -- cgit v1.2.3