docs: clarify meaning of injectable decorator (#31573)

PR Close #31573
This commit is contained in:
Judy Bogart
2019-07-15 12:49:14 -07:00
committed by Matias Niemelä
parent 1ac07757dd
commit 897bd18fbc
2 changed files with 9 additions and 5 deletions

View File

@ -185,8 +185,7 @@ is available to <code>declarations</code> of this module.</p>
</td>
</tr><tr>
<td><code><b>@Injectable()</b><br>class MyService() {}</code></td>
<td><p>Declares that a class has dependencies that should be injected into the constructor when the dependency injector is creating an instance of this class.
</p>
<td><p>Declares that a class can be provided and injected by other classes. Without this decorator, the compiler won't generate enough metadata to allow the class to be created properly when it's injected somewhere.</p>
</td>
</tr>
</tbody></table>