Model and Collection Factory for AngularJS.