Skip to content

{{#each}} attribute binding bug #497

etabard opened this Issue Feb 13, 2012 · 2 comments

3 participants

etabard commented Feb 13, 2012

I tried to display an array of pictures with each.
The src binding fails and the this.get('src') returns a "String object".

Here is my code :

App = Ember.Application.create();

Em.Image = SC.View.extend({
    tagName: 'img',
    attributeBindings: ['src', 'alt'],
    didChangeSrc: function() {

App.test = ['', ''];
<script type="text/x-handlebars">
       {{view Em.Image srcBinding="this" alt="no image"}}            


Exemple here :

Works outside of each :

Ember.js member
tchak commented Feb 13, 2012

You can use this as a workaround for now

didChangeSrc: function() {
    this.set('src', String(this.get('src')));
etabard commented Feb 13, 2012

Thanks for the quick workaround ;-)
It seems odd though !

@wagenet wagenet closed this in 03b685f Feb 14, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.