23 lines
687 B
JavaScript
23 lines
687 B
JavaScript
define(['app', 'jquery', 'underscore', 'backbone', 'model/categoryItem/categoryItemModel', 'classes/cachedCollection'],
|
|
function (app, $, _, Backbone, Category, CachedCollection){
|
|
|
|
var CategoryItems = CachedCollection.extend({
|
|
|
|
categoryId: null,
|
|
initialize: function (options) {
|
|
this.categoryId = options.categoryId;
|
|
this.cacheName = "Category" + this.categoryId;
|
|
},
|
|
// Book is the model of the collection
|
|
model:Category,
|
|
|
|
url: function() {
|
|
return myManifest.Settings.DefaultURL + "/api/ricette/" + this.categoryId;
|
|
}
|
|
});
|
|
|
|
return CategoryItems;
|
|
});
|
|
|
|
|