Skip to content

Commit d9170e2

Browse files
Merge pull request #2741 from shavidze/fix/circular-dependency-modules-example
docs(changes): show second example for Module forward reference section
2 parents e797455 + b829a2d commit d9170e2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

content/fundamentals/circular-dependency.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,13 @@ In order to resolve circular dependencies between modules, use the same `forward
7171
})
7272
export class CommonModule {}
7373
```
74+
75+
That covers one side of the relationship. Now let's do the same with `CatsModule`:
76+
77+
```typescript
78+
@@filename(cats.module)
79+
@Module({
80+
imports: [forwardRef(() => CommonModule)],
81+
})
82+
export class CatsModule {}
83+
```

0 commit comments

Comments
 (0)