diff options
Diffstat (limited to 'docs/content/tutorial/step_04.ngdoc')
| -rw-r--r-- | docs/content/tutorial/step_04.ngdoc | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/docs/content/tutorial/step_04.ngdoc b/docs/content/tutorial/step_04.ngdoc index 8cf429e1..2e92cfb2 100644 --- a/docs/content/tutorial/step_04.ngdoc +++ b/docs/content/tutorial/step_04.ngdoc @@ -65,25 +65,20 @@ necessary! __`app/js/controllers.js`:__ <pre> -function PhoneListCtrl($scope) { +var phonecatApp = angular.module('phonecatApp', []); + +phonecatApp.controller('PhoneListCtrl', function PhoneListCtrl($scope) { $scope.phones = [ - {"name": "Nexus S", - "snippet": "Fast just got faster with Nexus S.", - "age": 0}, - {"name": "Motorola XOOM™ with Wi-Fi", - "snippet": "The Next, Next Generation tablet.", - "age": 1}, - {"name": "MOTOROLA XOOM™", - "snippet": "The Next, Next Generation tablet.", - "age": 2} + {'name': 'Nexus S', + 'snippet': 'Fast just got faster with Nexus S.'}, + {'name': 'Motorola XOOM™ with Wi-Fi', + 'snippet': 'The Next, Next Generation tablet.'}, + {'name': 'MOTOROLA XOOM™', + 'snippet': 'The Next, Next Generation tablet.'} ]; $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 |
