mmblog /public/javascripts/mmblog/collection.js

Language Javascript Lines 36
MD5 Hash e8347e1b95e0d104edec36eec9520669
Repository https://github.com/coocon/mmblog.git View Raw File
| Open JSFiddle
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/**
 * collection
 */

define(function(require, exports, module) {
    var $ = require('jquery') 
      , _ = require('underscore')
      , Backbone = require('backbone')
      , model = require('./model');

    exports.ArticleList = Backbone.Collection.extend({

        model: model.Article, 

        url: '/article/' 

    });

    exports.RecentList = Backbone.Collection.extend({

        model: model.Recent,
        
        url: 'article/recent'    

    });

    exports.CommentList = Backbone.Collection.extend({

        model: model.Comment,

        url: '/comment/'

    });
});
Back to Top