diff options
| author | James Dunn | 2013-10-03 10:16:44 +0100 | 
|---|---|---|
| committer | Pete Bacon Darwin | 2013-10-03 10:19:19 +0100 | 
| commit | 575f63ac508a988e0c0ecbf93f62ea6f4bab13c0 (patch) | |
| tree | bd3fdf07e1b4d0e98a926b9f3ba25f3d4ab81bcd /docs/content/tutorial/step_04.ngdoc | |
| parent | d3fcacedd6e6fe14892fa110ebe20babd886d4bb (diff) | |
| download | angular.js-575f63ac508a988e0c0ecbf93f62ea6f4bab13c0.tar.bz2 | |
docs(tutorial): update examples to show best practices
Closes #4256, #4255, #4254, #4253, #4250, #4092
Diffstat (limited to 'docs/content/tutorial/step_04.ngdoc')
| -rw-r--r-- | docs/content/tutorial/step_04.ngdoc | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/docs/content/tutorial/step_04.ngdoc b/docs/content/tutorial/step_04.ngdoc index e14b3f8d..72ac70d5 100644 --- a/docs/content/tutorial/step_04.ngdoc +++ b/docs/content/tutorial/step_04.ngdoc @@ -65,7 +65,9 @@ necessary!  __`app/js/controllers.js`:__  <pre> -function PhoneListCtrl($scope) { +var myApp = angular.module('myApp',[]); + +myApp.controller('PhoneListCtrl', ['$scope', function($scope) {    $scope.phones = [      {"name": "Nexus S",       "snippet": "Fast just got faster with Nexus S.", @@ -79,7 +81,7 @@ function PhoneListCtrl($scope) {    ];    $scope.orderProp = 'age'; -} +}]);  </pre>  * We modified the `phones` model - the array of phones - and added an `age` property to each phone | 
