Skip to content

Commit 79f6a32

Browse files
authored
docs(fundamentals): clarify the default behavior of ModuleRef#get
1 parent 70ab91b commit 79f6a32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/fundamentals/module-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class CatsService {
2222
2323
#### Retrieving instances
2424

25-
The `ModuleRef` instance (hereafter we'll refer to it as the **module reference**) has a `get()` method. This method retrieves a provider, controller, or injectable (e.g., guard, interceptor, etc.) that exists (has been instantiated) in the **current** module using its injection token/class name.
25+
The `ModuleRef` instance (hereafter we'll refer to it as the **module reference**) has a `get()` method. By default, this method returns a provider, controller, or injectable (e.g., guard, interceptor, etc.) that was registered and has been instantiated in the *current module* using its injection token/class name. If the instance is not found, an exception will be raised.
2626

2727
```typescript
2828
@@filename(cats.service)

0 commit comments

Comments
 (0)