Skip to content

Instantly share code, notes, and snippets.

@tkh44
Created October 17, 2013 16:41
Show Gist options
  • Select an option

  • Save tkh44/7028196 to your computer and use it in GitHub Desktop.

Select an option

Save tkh44/7028196 to your computer and use it in GitHub Desktop.
// The contents of individual model .js files will be concatenated into dist/models.js
(function() {
// Protects views where angular is not loaded from errors
if ( typeof angular == 'undefined' ) {
return;
};
var module = angular.module('TacoModel', ['restangular']);
module.factory('TacoRestangular', function(Restangular) {
window.setTimeout(function() {
alert("Good! Now configure app/models/taco.js");
}, 2000);
return Restangular.withConfig(function(RestangularConfigurer) {
// -- Stackmob REST API configuration
// RestangularConfigurer.setBaseUrl('http://api.stackmob.com');
// RestangularConfigurer.setRestangularFields({
// id: "taco_id"
// });
// RestangularConfigurer.setDefaultHeaders({
// 'Accept': 'application/vnd.stackmob+json; version=0',
// 'X-StackMob-API-Key-<YOUR-API-KEY-HERE>': '1'
// });
});
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment