forked from angular/code.angularjs.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathangular.injector.html
18 lines (18 loc) · 944 Bytes
/
angular.injector.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<h1>angular.injector</h1>
<h2>Description</h2>
<p>Creates an inject function that can be used for dependency injection.</p><h2>Usage</h2>
<div ng:non-bindable=""><pre class="brush: js; html-script: true;">angular.injector(providerScope, providers, cache);</pre>
</div>
<h3>Parameters</h3>
<ul class="parameters"><li><code ng:non-bindable="">providerScope<i>(optional={})</i> – {Object} – </code>
provider's <code>this</code></li>
<li><code ng:non-bindable="">providers<i>(optional=angular.service)</i> – {Object.<string, function()>} – </code>
Map of provider (factory)
function.</li>
<li><code ng:non-bindable="">cache<i>(optional={})</i> – {Object.<string, function()>} – </code>
Place where instances are saved for reuse. Can
also be used to override services speciafied by <code>providers</code> (useful in tests).</li>
</ul>
<h3>Returns</h3>
<code ng:non-bindable="">function()</code>
– Injector function.