jeudi 28 mai 2015

Ember 1.12 now requiring me to use mode.propertyName rather than accessing properties directly

Just upgraded to 1.12, and where I had a project route that returns a single project from the store, previously I could access the properties of that model directly like {{projectName}}, but now I have to use {{model.projectName}}. can anyone shed light on what's going on?

Link-to from my projects route:

{{#link-to 'project.details' project.id title="Go to project details"}}

Model hook in project route:

model: function(params) {
  var record = this.store.getById('project', params.project_id)
  if(record) {
    return record.reload()
  } else {
    return this.store.find('project', params.project_id)
  }
}




Aucun commentaire:

Enregistrer un commentaire