Skip to content

Instantly share code, notes, and snippets.

@sabcio
Last active December 20, 2015 09:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sabcio/6106900 to your computer and use it in GitHub Desktop.
Save sabcio/6106900 to your computer and use it in GitHub Desktop.
Trying out emberJS
App = Ember.Application.create();
App.Store = DS.Store.extend({
revision: 12,
adapter: "DS.RESTAdapter"
});
controller (coffee):
App.ApplicationController = Ember.Controller.extend(
mainPages: App.Page.find
)
model (coffee):
App.Page = DS.Model.extend(
title: DS.attr("string")
content: DS.attr("string")
)
view:
{{#each mainPages}}
<p>{{title}}</p>
{{/each}}
error:
Uncaught Error: assertion failed: Your application does not have a 'Store' property defined. Attempts to call 'find' on model classes will fail. Please provide one as with 'YourAppName.Store = DS.Store.extend()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment