lundi 17 octobre 2016

Ember doesn't recognize model data in subfolder

The following structure of routes works fine for me.

Correct Structure

But whenever I moved faculty.js inside the faculty folder, my template stops recognizing the data. The static view elements still show up correctly, but the data model is logged as null. How can I fix it?

enter image description here

faculty.js

import Ember from 'ember';

export default Ember.Route.extend({
  model(){
      return {name:"Janusz", lastname:"Chudzynski", department:"Test"};
  }
});

faculty.hbs


<h2>Faculty</h2>



Console log

null




Aucun commentaire:

Enregistrer un commentaire