diff options
Diffstat (limited to 'docs/content/tutorial/step_04.ngdoc')
| -rw-r--r-- | docs/content/tutorial/step_04.ngdoc | 10 |
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 |
