I recently started working with ember.js and firebase. Right now, I have successfully implemented a feature to post messages and view them in a list format as shown below:
//templates/show-messages.hbs
{{page-title "ShowMessages"}}
<div class="container">
<div class="chat-container">
{{#each this.model as |message|}}
<div class="bubble">
<h3>{{message.text}}</h3>
<p>{{message.username}}</p>
</div>
{{/each}}
</div>
<ChatInput class="Input" @username="" @text=""></ChatInput>
</div>
//routes/show-messages.js
import Route from '@ember/routing/route';
export default class ShowMessagesRoute extends Route {
model() {
return this.store.findAll('chat-message');
}
}
However, I've encountered an issue where the chat window does not update when viewing it from another browser after posting a message. This results in the chat not updating as expected.
Can anyone provide guidance on how to address this issue effectively? Thank you.