Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit 1570bfd

Browse files
committed
docs(dependency-injection): tweak Dart wording
1 parent 2144b8e commit 1570bfd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

public/docs/ts/latest/guide/dependency-injection.jade

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,10 +704,13 @@ code-example(format, language="html").
704704
The injector resolves these tokens and injects the corresponding services into the matching factory function parameters.
705705
// #enddocregion providers-factory-4
706706
// #docregion providers-factory-5
707+
- var lang = current.path[1]
708+
- var anexportedvar = lang == 'dart' ? 'a constant' : 'an exported variable'
709+
- var variable = lang == 'dart' ? 'constant' : 'variable'
707710
:marked
708-
Notice that we captured the factory provider in an exported variable, `heroServiceProvider`.
711+
Notice that we captured the factory provider in #{anexportedvar}, `heroServiceProvider`.
709712
This extra step makes the factory provider reusable.
710-
We can register our `HeroService` with this variable wherever we need it.
713+
We can register our `HeroService` with this #{variable} wherever we need it.
711714

712715
In our sample, we need it only in the `HeroesComponent`,
713716
where it replaces the previous `HeroService` registration in the metadata `providers` array.

0 commit comments

Comments
 (0)