mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-08 23:04:45 +00:00
docs(guide): change example controller to properly call greet method on greeter
This commit is contained in:
parent
4fe4e7457c
commit
2f4967f100
1 changed files with 2 additions and 2 deletions
|
|
@ -92,7 +92,7 @@ dependency lookup responsibility to the injector by declaring the dependencies a
|
||||||
// And this controller definition
|
// And this controller definition
|
||||||
function MyController($scope, greeter) {
|
function MyController($scope, greeter) {
|
||||||
$scope.sayHello = function() {
|
$scope.sayHello = function() {
|
||||||
greeter('Hello World');
|
greeter.greet('Hello World');
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -231,4 +231,4 @@ of declaring factories is:
|
||||||
run(['depService', function(depService) {
|
run(['depService', function(depService) {
|
||||||
...
|
...
|
||||||
}]);
|
}]);
|
||||||
</pre>
|
</pre>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue