Skip to content

Commit

Permalink
docs: add information on when not to use tree-shakable providers
Browse files Browse the repository at this point in the history
  • Loading branch information
sreevani-ship-it committed May 1, 2018
1 parent c5cfc3a commit cc522eb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions aio/content/guide/dependency-injection.md
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,12 @@ The service can be instantiated by configuring a factory function as shown below

<code-example path="dependency-injection/src/app/tree-shaking/service.0.ts" title="src/app/tree-shaking/service.0.ts" linenums="false"> </code-example>

<div class="l-sub-section">

Note that you cannot override tree-shakable providers registered in the `@injectable` decorator of the service. Use the `providers[]` array syntax to register providers when you intend to override providers in your app.

</div>

{@a injector-config}
{@a bootstrap}

Expand Down

0 comments on commit cc522eb

Please sign in to comment.