diff options
| author | Chance | 2013-11-16 22:56:23 -0500 |
|---|---|---|
| committer | Pete Bacon Darwin | 2013-11-18 12:49:19 +0000 |
| commit | ac56d1c9d90e0fc3996198a386f7599deeae65c6 (patch) | |
| tree | 32a0c1ab3b6f7a6e6d48b535178e769d0d74641a /docs/content/tutorial/step_04.ngdoc | |
| parent | de2919cb9aa7491657cdeb32fa4fffe88255129a (diff) | |
| download | angular.js-ac56d1c9d90e0fc3996198a386f7599deeae65c6.tar.bz2 | |
docs(tutorial/step-4): controllers are no longer global functions
The docs did not line up with the codebase / previous steps of the tutorial.
Closes #4988
Diffstat (limited to 'docs/content/tutorial/step_04.ngdoc')
| -rw-r--r-- | docs/content/tutorial/step_04.ngdoc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/docs/content/tutorial/step_04.ngdoc b/docs/content/tutorial/step_04.ngdoc index df1b23ec..c2edf573 100644 --- a/docs/content/tutorial/step_04.ngdoc +++ b/docs/content/tutorial/step_04.ngdoc @@ -112,11 +112,12 @@ describe('PhoneCat controllers', function() { describe('PhoneListCtrl', function(){ var scope, ctrl; - beforeEach(function() { - scope = {}, - ctrl = new PhoneListCtrl(scope); - }); - + beforeEach(module('phonecatApp')); + + beforeEach(inject(function($controller) { + scope = {}; + ctrl = $controller('PhoneListCtrl', {$scope:scope}); + })); it('should create "phones" model with 3 phones', function() { expect(scope.phones.length).toBe(3); |
