mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
docs($injector): correct misuse of $inject
$inject was used where $injector was appropriate; confusing and misleading.
This commit is contained in:
parent
5727eaf767
commit
bf114f6ee3
1 changed files with 3 additions and 3 deletions
|
|
@ -100,15 +100,15 @@ function annotate(fn) {
|
|||
*
|
||||
* <pre>
|
||||
* // inferred (only works if code not minified/obfuscated)
|
||||
* $inject.invoke(function(serviceA){});
|
||||
* $injector.invoke(function(serviceA){});
|
||||
*
|
||||
* // annotated
|
||||
* function explicit(serviceA) {};
|
||||
* explicit.$inject = ['serviceA'];
|
||||
* $inject.invoke(explicit);
|
||||
* $injector.invoke(explicit);
|
||||
*
|
||||
* // inline
|
||||
* $inject.invoke(['serviceA', function(serviceA){}]);
|
||||
* $injector.invoke(['serviceA', function(serviceA){}]);
|
||||
* </pre>
|
||||
*
|
||||
* ## Inference
|
||||
|
|
|
|||
Loading…
Reference in a new issue