Browse Source

Update 'README.md'

develop
Garrett Mills 2 years ago
parent
commit
70fb90d936
  1. 4
      README.md

4
README.md

@ -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