This repository was archived by the owner on Dec 4, 2017. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
public/docs/dart/latest/guide Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -126,13 +126,11 @@ block dart-map-alternative
126
126
The Dart [cascade notation][cascade] (`..`) provides a convenient means of initializing
127
127
a configuration object.
128
128
129
- Use of the cascaded initialization idiom
130
- prevents us from defining our configuration object instance as `const`.
131
- As a consequence, we cannot declare a [value provider](#value-provider),
132
- but a [factory provider](#factory-provider) does the trick.
133
-
134
- We illustrate this below by providing and injecting the configuration object in our
135
- top-level `AppComponent`:
129
+ If we use cascades, the configuration object can't be declared `const` and
130
+ we can't use a [value provider](#value-provider).
131
+ A solution is to use a [factory provider](#factory-provider).
132
+ We illustrate this next. We also show how to provide and inject the
133
+ configuration object in our top-level `AppComponent`:
136
134
137
135
[cascade]: https://www.dartlang.org/docs/dart-up-and-running/ch02.html#cascade
138
136
You can’t perform that action at this time.
0 commit comments