Skip to content

Commit 6b2f760

Browse files
authored
Update connectionFactory constant to connectionProvider
1 parent 58da1aa commit 6b2f760

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

content/fundamentals/dependency-injection.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ The `useFactory` syntax allows for creating providers **dynamically**. The actua
240240

241241
```typescript
242242
@@filename()
243-
const connectionFactory = {
243+
const connectionProvider = {
244244
provide: 'CONNECTION',
245245
useFactory: (optionsProvider: OptionsProvider, optionalProvider?: string) => {
246246
const options = optionsProvider.get();
@@ -254,14 +254,14 @@ const connectionFactory = {
254254

255255
@Module({
256256
providers: [
257-
connectionFactory,
257+
connectionProvider,
258258
OptionsProvider,
259259
// { provide: 'SomeOptionalProvider', useValue: 'anything' },
260260
],
261261
})
262262
export class AppModule {}
263263
@@switch
264-
const connectionFactory = {
264+
const connectionProvider = {
265265
provide: 'CONNECTION',
266266
useFactory: (optionsProvider, optionalProvider) => {
267267
const options = optionsProvider.get();
@@ -275,7 +275,7 @@ const connectionFactory = {
275275

276276
@Module({
277277
providers: [
278-
connectionFactory,
278+
connectionProvider,
279279
OptionsProvider,
280280
// { provide: 'SomeOptionalProvider', useValue: 'anything' },
281281
],

0 commit comments

Comments
 (0)