lundi 9 mai 2016

Emberjs #each loop not working on array data

I'm just trying to loop through some dummy data I generated just so I can style the site, I have this in my router:

import Ember from 'ember';

export default Ember.Route.extend({
  chatMessages() {
      return [{
      username: "John Doe",
      message: "Blah Blah Blah",
      dispic: "http://ift.tt/1ZxZrKF"
    }]
  },
  activate() {
    this.controllerFor('chatroom').subscribe();
  }
});

and then in my index.hbs

    
      
    
      
    

But I only ever see the else statement. Any information would be great thanks




Aucun commentaire:

Enregistrer un commentaire