简体   繁体   中英

Render Data from Fixtures in Ember

I am trying to build simple ember application. I used the cache FIXTURES for rendering the data in template. But, I dont what am doing wrong in this template.

Here is the example jsbin

Template Code:

{{#each}}
      <option>{{mname}}</option>
{{/each}}

Js code:

 timeZoneApp.CalendarboxRoute = Ember.Route.extend({
   model: function() {
       return this.store.findAll('calendarbox');
   }
});

You forgot to actually define the route:

timeZoneApp.Router.map(function() {
  this.resource('calendarbox', {path: '/'});
});

http://jsbin.com/tewelusewe/1/edit?html,js,output

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM