Browse Source

chore: updates README.md

e22m4u 2 years ago
parent
commit
5592a38b1b
1 changed files with 8 additions and 1 deletions
  1. 8 1
      README.md

+ 8 - 1
README.md

@@ -77,7 +77,7 @@ class Bar extends Service {
 
 class App extends Service {
   method() {
-    // доступ к сервисам
+    // доступ к сервисам Foo и Bar
     const foo = this.getService(Foo);
     const bar = this.getService(Bar);
     // ...
@@ -98,6 +98,13 @@ const app = new App();
 сервис будет пересоздан с передачей этих аргументов
 конструктору.
 
+Пример:
+
+```js
+// вызов с аргументами конструктора
+const foo = this.getService(Foo, 'arg1', 'arg2');
+```
+
 ## Тесты
 
 ```bash