Does Ember.js support model for app route?

In my Handelbar Ember Application template, I need some model data to display. In Index or other routes, these types of code work, but they don't work in the application route. Application route :

App.ApplicationRoute = Ember.Route.extend({
 model: function()


Application template:

<script type="text/x-handlebars" data-template-name="application">



App.ApplicationAdapter = DS.FixtureAdapter;

App.Archive = DS.Model.extend({
  title: DS.attr('string'),
  day:   DS.attr('number')

App.Archive.FIXTURES = [
  "title": "First title",
  "day": 06
  "title": "Second title",
  "day": 08


I couldn't find out where the problem is. In Ember, can you use a model for an app template?


source to share

1 answer

Yes, definitely, the main reason your code won't work would be if you have an application controller installed that was not an ArrayController.




All Articles