Last active
December 20, 2015 09:19
-
-
Save sabcio/6106900 to your computer and use it in GitHub Desktop.
Trying out emberJS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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