mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-04-23 08:04:43 +00:00
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
This commit is contained in:
parent
de2919cb9a
commit
ac56d1c9d9
1 changed files with 6 additions and 5 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue