aboutsummaryrefslogtreecommitdiffstats
path: root/docs/content
diff options
context:
space:
mode:
authorChance2013-11-16 22:56:23 -0500
committerPete Bacon Darwin2013-11-18 12:49:19 +0000
commitac56d1c9d90e0fc3996198a386f7599deeae65c6 (patch)
tree32a0c1ab3b6f7a6e6d48b535178e769d0d74641a /docs/content
parentde2919cb9aa7491657cdeb32fa4fffe88255129a (diff)
downloadangular.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')
-rw-r--r--docs/content/tutorial/step_04.ngdoc11
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);