Skip to content

Commit

Permalink
Merge pull request #2741 from shavidze/fix/circular-dependency-module…
Browse files Browse the repository at this point in the history
…s-example

docs(changes): show second example for Module forward reference section
  • Loading branch information
kamilmysliwiec authored May 26, 2023
2 parents e797455 + b829a2d commit d9170e2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions content/fundamentals/circular-dependency.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,13 @@ In order to resolve circular dependencies between modules, use the same `forward
})
export class CommonModule {}
```

That covers one side of the relationship. Now let's do the same with `CatsModule`:

```typescript
@@filename(cats.module)
@Module({
imports: [forwardRef(() => CommonModule)],
})
export class CatsModule {}
```

0 comments on commit d9170e2

Please sign in to comment.