forked from angular/code.angularjs.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathangular.scope.$service.html
20 lines (20 loc) · 1.03 KB
/
angular.scope.$service.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<h1>angular.scope.$service</h1>
<div class="angular-scope-service"><fieldset class="workInProgress"><legend>Work in Progress</legend>
This page is currently being revised. It might be incomplete or contain inaccuracies.</fieldset>
<h2>Description</h2>
<div class="description"><p>Provides access to angular's dependency injector and
<a href="#!angular.service"><code>registered services</code></a>. In general the use of this api is discouraged,
except for tests and components that currently don't support dependency injection (widgets,
filters, etc).</p></div>
<h2>Usage</h2>
<div class="usage"><div ng:non-bindable=""><pre class="brush: js; html-script: true;">angular.scope.$service(serviceId);</pre>
</div>
<h3>Parameters</h3>
<ul class="parameters"><li><code ng:non-bindable="">serviceId – {string} – </code>
<p>String ID of the service to return.</p></li>
</ul>
<h3>Returns</h3>
<div class="returns"><code ng:non-bindable="">{*}</code>
– <p>Value, object or function returned by the service factory function if any.</p></div>
</div>
</div>