Skip to content

Commit 6c241eb

Browse files
authored
Merge pull request #59 from j3ddesign/master
Add Container.import block to multiple svc demo
2 parents df8b314 + 3758da8 commit 6c241eb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,12 @@ export class WaterFactory implements Factory {
645645
}
646646

647647
// app.ts
648-
// now you can get all factories in a single array
648+
// now you can get all factories in a single array
649+
Container.import([
650+
BeanFactory,
651+
SugarFactory,
652+
WaterFactory,
653+
]);
649654
const factories = Container.getMany(FactoryToken); // factories is Factory[]
650655
factories.forEach(factory => factory.create());
651656
```

0 commit comments

Comments
 (0)