aboutsummaryrefslogtreecommitdiffstats
path: root/docs/content/tutorial
diff options
context:
space:
mode:
authorahliddin2014-02-15 22:22:15 +0100
committerPeter Bacon Darwin2014-02-18 05:47:04 +0000
commit2407891ddf2d99b08106ceeaed7ae4f16ee0d760 (patch)
tree023bc60a44537612f287bc9c291ba9b12857036a /docs/content/tutorial
parent666137d6359c9474c9912fc81ebc4d8f478cc1b5 (diff)
downloadangular.js-2407891ddf2d99b08106ceeaed7ae4f16ee0d760.tar.bz2
docs(tutorial/step-11): add controller to correct object
Diffstat (limited to 'docs/content/tutorial')
-rw-r--r--docs/content/tutorial/step_11.ngdoc6
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/content/tutorial/step_11.ngdoc b/docs/content/tutorial/step_11.ngdoc
index a89b0a5b..dad92bb8 100644
--- a/docs/content/tutorial/step_11.ngdoc
+++ b/docs/content/tutorial/step_11.ngdoc
@@ -81,14 +81,16 @@ now to understand what the code in our controllers is doing.
__`app/js/controllers.js`.__
```js
+var phonecatControllers = angular.module('phonecatControllers', []);
+
...
-phonecatApp.controller('PhoneListCtrl', ['$scope', 'Phone', function($scope, Phone) {
+phonecatControllers.controller('PhoneListCtrl', ['$scope', 'Phone', function($scope, Phone) {
$scope.phones = Phone.query();
$scope.orderProp = 'age';
}]);
-phonecatApp.controller('PhoneDetailCtrl', ['$scope', '$routeParams', 'Phone', function($scope, $routeParams, Phone) {
+phonecatControllers.controller('PhoneDetailCtrl', ['$scope', '$routeParams', 'Phone', function($scope, $routeParams, Phone) {
$scope.phone = Phone.get({phoneId: $routeParams.phoneId}, function(phone) {
$scope.mainImageUrl = phone.images[0];
});