Currently working on a chat app with Ember, which is going fantastic as Ember is really nice to work with.
I currently have a chat window, obviously with many lines of people chatting.
I would like to scroll the chat window down on initial page load, here's an example:
<div class="chat-window">
</div>
So how might a bind an event to the entire template being loaded (in this case its index.hbs
I know you can do this with components through something like:
import Ember from 'ember';
export default Ember.Component.extend({
didInsertElement() {
this.$('.button-collapse').sideNav();
}
});
Which works fine, so what would the equivalent be for doing it to a template.
As far as I know there is only the index.hbs
and index.js
route file.
Any information would be great thanks.
Aucun commentaire:
Enregistrer un commentaire