185eee2a6b
closes #64 - adds a full example of using backbone on the frontend remembered to squash this one!
17 lines
389 B
JavaScript
17 lines
389 B
JavaScript
/*global window, document, Ghost, $, Backbone, _ */
|
|
(function () {
|
|
"use strict";
|
|
|
|
Ghost.Model.Post = Backbone.Model.extend({
|
|
urlRoot: '/api/v0.1/posts/',
|
|
defaults: {
|
|
status: 'draft'
|
|
}
|
|
});
|
|
|
|
Ghost.Collection.Posts = Backbone.Collection.extend({
|
|
url: Ghost.settings.baseURL + '/posts',
|
|
model: Ghost.Model.Post
|
|
});
|
|
|
|
}()); |