vendredi 30 août 2019

Why some properties don't show in hbs?

I've made a model with some properties:

name: DS.attr('string'),
avatar: DS.attr('string', {defaultValue: 'https://dummyimage.com/100x100/fff/000'}),
yearStart: DS.attr('number'),
experience: computed('yearStart', function() {
    return '56';
}),

And a template where I'm trying to get those properties to a browser:

<ul>
    
        <li>
            <img src= alt=>
            <a href="#"></a>
            <br>
            Начал в  г.
             лет опыта
            <br>
            
        </li>
    
</ul>

this.model is filled with router by this.store.findAll('photographer');. The data is coming from mirage-cli:

    return {
        data: [
            {
                type: 'photographer',
                id: 1,
                attributes: {
                    name: 'Василий Пупкович Иванов',
                    'year-start': 2000,
                }
            }
        ]
    };

With Ember Inspector I see the photographer has property yearStart filled with value of 2000, but it is not shown in browser (and experience property too).

What am I doing wrong?




Aucun commentaire:

Enregistrer un commentaire