Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit ac56d1c

Browse files
chancedpetebacondarwin
authored andcommitted
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
1 parent de2919c commit ac56d1c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

docs/content/tutorial/step_04.ngdoc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,12 @@ describe('PhoneCat controllers', function() {
112112
describe('PhoneListCtrl', function(){
113113
var scope, ctrl;
114114

115-
beforeEach(function() {
116-
scope = {},
117-
ctrl = new PhoneListCtrl(scope);
118-
});
119-
115+
beforeEach(module('phonecatApp'));
116+
117+
beforeEach(inject(function($controller) {
118+
scope = {};
119+
ctrl = $controller('PhoneListCtrl', {$scope:scope});
120+
}));
120121

121122
it('should create "phones" model with 3 phones', function() {
122123
expect(scope.phones.length).toBe(3);

0 commit comments

Comments
 (0)