Skip to content

Commit

Permalink
Merge pull request #107 from ppjjzz/master
Browse files Browse the repository at this point in the history
doc:fix demo code error
  • Loading branch information
czy88840616 authored Jan 11, 2019
2 parents 029cfe4 + c578d24 commit 4030e04
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/ioc.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import {B} from './B';
class C {
consturctor() {
this.a = new A();
this.b = new B(a);
this.b = new B(this.a);
}
}
```
Expand All @@ -66,6 +66,8 @@ npm i injection --save
```ts
// 使用 IoC
import {Container} from 'injection';
import {A} from './A';
import {B} from './B';
const container = new Container();
container.bind(A);
container.bind(B);
Expand Down

0 comments on commit 4030e04

Please sign in to comment.