Skip to content

Commit bccf037

Browse files
author
mcibique
committed
Fixed typos
1 parent fabe12c commit bccf037

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ export default class AuthService {
273273

274274
container.bind('authService').to(AuthService);
275275
```
276-
2. We have lots of [magic strings](http://deviq.com/magic-strings/) everywhere (e.g. what we would do if `authService` changes the name? How we prevent naming collisions). Well, ES6 introduced [symbols](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) that we can use. Don't forget to export the Symbol:
276+
2. We have lots of [magic strings](http://deviq.com/magic-strings/) everywhere (e.g. what we would do if `authService` changes the name? How we prevent naming collisions?). Well, ES6 introduced [symbols](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) that we can use. Don't forget to export the symbol so it can be used later:
277277
```js
278278
import container from './di';
279279

@@ -331,7 +331,7 @@ export default class AuthService {
331331

332332
```
333333

334-
If your service depends on other services, you can pass IDs as a second parameters:
334+
If your service depends on other services, you can pass array of IDs as a second parameter:
335335
```js
336336
import { Register } from '@di';
337337
import { OTHER_SERVICE_ID } from './other-service';
@@ -350,10 +350,11 @@ export default class AuthService {
350350
}
351351
}
352352
```
353+
DI will ensure that the otherService will be instantiated first, using `OTHER_SERVICE_ID` to locate the constructor.
353354
Check out documentation for [inversify-vanillajs-helpers](https://github.com/inversify/inversify-vanillajs-helpers#usage) to see all possibilities
354355

355356
### @LazyInject decorator
356-
We can improve injection in our VUE components too by using LazyInject decorators from [inversify-inject-decorators](https://github.com/inversify/inversify-inject-decorators). Let's create it and export it in `di.js` first:
357+
We can improve injection in our VUE components too, by using LazyInject decorators from [inversify-inject-decorators](https://github.com/inversify/inversify-inject-decorators). Let's create it and export it in `di.js` first:
357358
```js
358359
import getDecorators from 'inversify-inject-decorators';
359360

0 commit comments

Comments
 (0)