Reputation: 1082
On the Homepage of EmberJS there are short code snippets:
App.Person = DS.Model.extend({
firstName: DS.attr('string'),
lastName: DS.attr('string'),
fullName: function() {
return this.get('firstName') +
" " + this.get('lastName');
}.property('firstName', 'lastName')
});
App.peopleController = Em.ArrayController.create({
content: App.Person.find()
});
Now when I am trying to build this I get an DS is undefined? I did include Handlebars, and looking thru the sourcecode there is nowhere a defintion to be found for DS.
Other examples on the net dont use DS, but Em, but these Examples are pretty old (in internettime at least). What am I doing wrong? What am I missing?
Upvotes: 2
Views: 96
Reputation: 3971
DS
is ember-data. You need to include it in order to use DS
: ember-data on github.
Ember-data is Ember's persistence library (models and server communication).
Upvotes: 2