Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save warodri-sendbird/d2f670a64c685df8d1fb6dbb5df44a39 to your computer and use it in GitHub Desktop.

Select an option

Save warodri-sendbird/d2f670a64c685df8d1fb6dbb5df44a39 to your computer and use it in GitHub Desktop.
<p>
<button (click)="connect()">Connect to chat</button>
</p>
<div>
<h3>Messages in the conversation</h3>
<ul>
<li *ngFor="let message of messages">
{{ message['message'] }}
</li>
</ul>
</div>
<div>
<h3>My Conversations</h3>
<ul>
<li *ngFor="let channel of conversations">
{{ channel.name }}
<button (click)="getMessages(channel)">Get messages</button>
</li>
</ul>
<div>
{{ listConversationsResult }}
</div>
</div>
<div *ngIf="selectedChannel">
<h3>Send a message to the selected channel</h3>
<table>
<tr>
<td>
<input
type="text"
placeholder="Type your message..."
(input)="updateTextMessage($event)"
/>
</td>
<td>
<button (click)="sendMessage()">Send</button>
</td>
</tr>
</table>
</div>
<div>
<button (click)="startConversation()">Start a conversation</button>
<div>
{{ startConversationResult }}
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment