docs(guide/module) fixed global controller in example

Global controllers have been disallowed in Angular 1.3

Closes #8248
This commit is contained in:
Nick Van Dyck
2014-07-18 01:26:49 +02:00
committed by Peter Bacon Darwin
parent 3ba98186b8
commit 222edd8031

View File

@@ -99,7 +99,7 @@ The above is a suggestion. Tailor it to your needs.
angular.module('xmpl.directive', []);
angular.module('xmpl.filter', []);
angular.module('xmpl', ['xmpl.service', 'xmpl.directive', 'xmpl.filter']).
run(function(greeter, user) {
// This is effectively part of the main method initialization code
@@ -107,13 +107,11 @@ The above is a suggestion. Tailor it to your needs.
salutation: 'Bonjour'
});
user.load('World');
}).
controller('XmplController', function($scope, greeter, user){
$scope.greeting = greeter.greet(user.name);
});
// A Controller for your app
var XmplController = function($scope, greeter, user) {
$scope.greeting = greeter.greet(user.name);
};
</file>
</example>