docs($q): note that function okToGreet is expected to be defined in example

the function okToGreet wasn't defined, so this example wouldn't work properly.

I've decided that instead of adding unrelated code to the example, it should just be noted that the
function is expected to be defined in the lexical scope.

Closes #5878
This commit is contained in:
letsmakesense 2014-01-18 14:02:33 -06:00 committed by Caitlin Potter
parent 928d000db7
commit 90e60d2d54

View file

@ -16,9 +16,9 @@
* asynchronous programming what `try`, `catch` and `throw` keywords are to synchronous programming.
*
* <pre>
* // for the purpose of this example let's assume that variables `$q` and `scope` are
* // available in the current lexical scope (they could have been injected or passed in).
*
* // for the purpose of this example let's assume that variables `$q`, `scope` and `okToGreet`
* // are available in the current lexical scope (they could have been injected or passed in).
*
* function asyncGreet(name) {
* var deferred = $q.defer();
*