Browse Source

Update 'README.md'

tags/v0.4.0
Garrett Mills 3 weeks ago
parent
commit
70fb90d936
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      README.md

+ 2
- 2
README.md View File

@@ -121,7 +121,7 @@ class MyClass extends Injectable {
}

const di = new DependencyInjector()
di.register('a', A)
di.container.register('a', A)

di.make(MyClass)
const my_class = new MyClass()
@@ -129,7 +129,7 @@ const my_class = new MyClass()
console.log(my_class.a) // => A { number: 3.141 }
console.log(my_class.b) // => B { }

di.register('b', B)
di.container.register('b', B)

console.log(my_class.a) // => A { number: 3.141 }
console.log(my_class.b) // => B { number: 3.142 }

Loading…
Cancel
Save