diff options
Diffstat (limited to 'docs/content/tutorial/step_08.ngdoc')
| -rw-r--r-- | docs/content/tutorial/step_08.ngdoc | 7 | 
1 files changed, 3 insertions, 4 deletions
diff --git a/docs/content/tutorial/step_08.ngdoc b/docs/content/tutorial/step_08.ngdoc index 7e7eb3ee..503b4347 100644 --- a/docs/content/tutorial/step_08.ngdoc +++ b/docs/content/tutorial/step_08.ngdoc @@ -61,13 +61,12 @@ the same way as the phone list controller.  __`app/js/controllers.js`:__  <pre> -function PhoneDetailCtrl($scope, $routeParams, $http) { +var myApp = angular.module('myApp',[]); +myApp.controller('PhoneDetailCtrl', ['$scope', '$routeParams', '$http', function($scope, $routeParams, $http) {    $http.get('phones/' + $routeParams.phoneId + '.json').success(function(data) {      $scope.phone = data;    }); -} - -//PhoneDetailCtrl.$inject = ['$scope', '$routeParams', '$http']; +}]);  </pre>  To construct the URL for the HTTP request, we use `$routeParams.phoneId` extracted from the current  | 
