Created
October 17, 2013 16:41
-
-
Save tkh44/7028196 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // 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