lundi 23 mai 2016

Ember tutorial error: models/rental.js: line 4, col 12, 'attr' is not defined

I'm going through the main tutorial on the ember website and I got to the end of this page: http://ift.tt/1MLtopy

In the command prompt ember is saying this

models/rental.js: line 4, col 12, 'attr' is not defined.

It is referencing this bit

export default Model.extend({
    title: attr(),
    owner: attr(),
    city: attr(),
    type: attr(),
    image: attr(),
    bedrooms: attr()
});

When I reach the bottom of the tutorial, the page is just completely blank when it loads.

When I delete the title: attr(), bits that are erroring, the error goes away and the page loads the hard coded HTML but the variable fields aren't populated with anything. The looping functionality does occur though.

Can someone please help me figure out where I'm going wrong?




Aucun commentaire:

Enregistrer un commentaire