Created
September 23, 2015 11:37
-
-
Save DrMabuse23/9b5f0686bbba07b076f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/** | |
* @ngdoc service | |
* @name sync:TangaCollectionService | |
* @description add your description | |
*/ | |
angular.module('tanga') | |
.service('TangaCollectionService', function TangaCollectionService(Backbone, _) { | |
var self = this; | |
this.options = { | |
parse: function (resp) { | |
return resp.data; | |
} | |
}; | |
/** | |
* @ngdoc method | |
* @name getCollection | |
* @description return a Backbone Collection | |
* @methodOf sync:TangaCollectionService | |
*/ | |
this.getCollection = function (options) { | |
var Entity = Backbone.Collection.extend(_.extend(self.options, options)); | |
return new Entity(); | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment