summaryrefslogtreecommitdiff
path: root/sample-apps/angular-chat/src/app/app.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'sample-apps/angular-chat/src/app/app.component.ts')
-rw-r--r--sample-apps/angular-chat/src/app/app.component.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/sample-apps/angular-chat/src/app/app.component.ts b/sample-apps/angular-chat/src/app/app.component.ts
index 8048476..02a1f9e 100644
--- a/sample-apps/angular-chat/src/app/app.component.ts
+++ b/sample-apps/angular-chat/src/app/app.component.ts
@@ -14,11 +14,13 @@ export class AppComponent {
userId: string = ''
chatRoomId: string
messages$: Observable<ChatMessage[]>
+ directory$: Observable<string[]>
messageBuff: string
constructor(private messaging: MessagingService) {}
ngOnInit() {
this.messaging.init()
+ this.directory$ = this.messaging.getDirectory()
}
sendMessage() {
@@ -26,7 +28,7 @@ export class AppComponent {
}
async makeChatRoom() {
- this.chatRoomId = await this.messaging.makeChatRoom(this.userId)
+ this.chatRoomId = await this.messaging.makeChatRoom()
this.messages$ = this.messaging.getChatRoom(this.chatRoomId)
}
}