I've got a controller like this:
import Ember from 'ember';
export default Ember.ArrayController.extend({
currentTrack: {'http://ift.tt/1E6GyHF'}
})
and a template-file like this:
<div class="song">
<img {{bind-attr src=currentTrack.artwork_url}} />
</div>
For some reason this causes Ember to send a HTTP-request to http://localhost:4200/undefined . It doesn't happen when currentTrack is just a string.
How can I prevent that but still us currentTrack as an object (it normally has more attributes. I just left them out for the sake of simplicity)?
Aucun commentaire:
Enregistrer un commentaire