jeudi 7 juillet 2016

Ember model.get() not returning values or binding to template properly

I have a route which populates a model property via the .store.query() method inside an RSVP hash:

myData: this.store.query('table-datum', parameters)

This returns a promise and seems to get data into my store according to the Ember inspector, I see the correct number of rows and they all have attributes with data populated.

I then have a simple component template inside my main view template with an each block to display the output:

    
        <tr>
            <td></td>
            <td></td>
        </tr>
    

I'm passing the property to my component like this:

        <div id="tableContainer">
              
        </div>

But for some reason the template binds the correct number of rows, but isn't correctly accessing the prop1 and prop2 bits of the class (so I just get 20 or so blank table rows)

If I try to output just in my template it looks like this:

<client@model:table-datum::ember574:1>

I'm pretty sure the data is there somewhere just it seems like my template isn't accessing the properties for some reason.

Any ideas as to where to look for this one?

Aucun commentaire:

Enregistrer un commentaire