mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-04 22:49:48 +08:00
docs(guide): change example controller to properly call greet method on greeter
This commit is contained in:
committed by
Pawel Kozlowski
parent
f0c6ebc076
commit
8d42ce8563
@@ -92,7 +92,7 @@ dependency lookup responsibility to the injector by declaring the dependencies a
|
||||
// And this controller definition
|
||||
function MyController($scope, greeter) {
|
||||
$scope.sayHello = function() {
|
||||
greeter('Hello World');
|
||||
greeter.greet('Hello World');
|
||||
};
|
||||
}
|
||||
|
||||
@@ -231,4 +231,4 @@ of declaring factories is:
|
||||
run(['depService', function(depService) {
|
||||
...
|
||||
}]);
|
||||
</pre>
|
||||
</pre>
|
||||
|
||||
Reference in New Issue
Block a user