diff --git a/README.md b/README.md index 00dd522..57298a3 100644 --- a/README.md +++ b/README.md @@ -55,9 +55,7 @@ export class ChatService { getMessage() { return this.socket .fromEvent("message") - .subscribe((message) => { - // todo - }); + .map( data => data.msg ); } } ``` @@ -162,9 +160,7 @@ class ChatService { getMessage() { return this.socket .fromEvent("message") - .subscribe((message) => { - // todo - }); + .map(data => data.msg ); } close() {