mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-01-12 22:45:52 +08:00
docs(guide/module) fixed global controller in example
Global controllers have been disallowed in Angular 1.3 Closes #8248
This commit is contained in:
committed by
Peter Bacon Darwin
parent
3ba98186b8
commit
222edd8031
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user