jquery Programming Glossary: bookmodel
Understand Backbone.js REST calls http://stackoverflow.com/questions/18504235/understand-backbone-js-rest-calls of code you might find in a Backbone application. var BookModel Backbone.Model.extend urlRoot ' books' var BookCollection Backbone.Collection.extend.. books' var BookCollection Backbone.Collection.extend model BookModel url ' books' Create POST Since we're using a RESTful API that's.. The following code should suffice var brandNewBook new BookModel title '1984' author 'George Orwel' brandNewBook.save Backbone..
Understand Backbone.js REST calls http://stackoverflow.com/questions/18504235/understand-backbone-js-rest-calls does this relate to Backbone Let's find out Here's a small chunk of code you might find in a Backbone application. var BookModel Backbone.Model.extend urlRoot ' books' var BookCollection Backbone.Collection.extend model BookModel url ' books' Create.. application. var BookModel Backbone.Model.extend urlRoot ' books' var BookCollection Backbone.Collection.extend model BookModel url ' books' Create POST Since we're using a RESTful API that's all the information Backbone needs to be able to create.. all of our book information Let's start by making a new book. The following code should suffice var brandNewBook new BookModel title '1984' author 'George Orwel' brandNewBook.save Backbone realizes you're trying to create a new book and knows from..
|