Skip to content

Commit 665c3ea

Browse files
committed
fixup! feat(ripples): support updating global ripple options at runtime
Address feedback
1 parent 8a93ac9 commit 665c3ea

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/lib/core/ripple/ripple.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,12 @@ const globalRippleConfig: RippleGlobalOptions = {
142142

143143
### Updating global options at runtime
144144

145-
Developers are able to update the global `ripple` options at runtime by just injecting the
146-
the `MAT_RIPPLE_GLOBAL_OPTIONS` provider and updating its options. Note that there are
147-
multiple ways to inject the global options.
145+
To change global ripple options at runtime, just inject the `MAT_RIPPLE_GLOBAL_OPTIONS`
146+
provider and update the desired options.
148147

149-
For example, developers could create a class for the options and use it for the global
150-
options. This makes it more simple and clean to update options at runtime.
148+
There are various ways of injecting the global options. In order to make it easier to
149+
inject and update options at runtime, it's recommended to create a service that implements
150+
the `RippleGlobalOptions` interface.
151151

152152
```ts
153153
@Injectable({providedIn: 'root'})
@@ -166,8 +166,8 @@ export class AppGlobalRippleOptions implements RippleGlobalOptions {
166166
export class MyModule {...}
167167
```
168168

169-
Now that the global ripple options are set to an existing provider, we can inject the
170-
service in our component and update the desired ripple options at runtime.
169+
Now that the global ripple options are set to a service we can inject, the service can be
170+
used update any global ripple option at runtime.
171171

172172
```ts
173173
@Component(...)

0 commit comments

Comments
 (0)