0
votes

I am trying to create application with Ember.js, but without storing the data, i want to have all my routes and templates defined before. For example, i want to have menu and when clicking on it i want different parts of code rendered, but without storing data with ember data or whatever else, like it is in code below. Does anyone have tutorial or code that helps me with this?

 App.IndexRoute = Ember.Route.extend({
   model : function(){
    var stories = this.get('store').findAll('story');
    return stories;
  }
});
1
What's the point of using an MVC framework if you don't have a M? It sounds like you would be better off with jQuery UI Tabs or something.Quentin
The guides, using ember data is optional... emberjs.com/guidesKingpin2k

1 Answers

0
votes

If you want hardcoded data, just return whatever objects/arrays you want to use from the model hook.

App.IndexRoute = Ember.Route.extend({
   model : function() {
    return {
      title: "Some title",
      whatever: []
    };
  }
});

If you don't need data at all, don't return anything. You should, however, still have model: hook, because otherwise Ember will try to create one for you, using main data store.