Skip to content

Instantly share code, notes, and snippets.

@mgonto
Created April 10, 2013 00:14
Show Gist options
  • Save mgonto/5350606 to your computer and use it in GitHub Desktop.
Save mgonto/5350606 to your computer and use it in GitHub Desktop.
Restangular configuration
var app = angular.module('angularjs-starter', ['restangular']);
// Using RestangularProvider we can configure properties. To check all properties go to https://github.com/mgonto/restangular
app.config(function(RestangularProvider) {
RestangularProvider.setBaseUrl('/api/v1');
});
// Here it injects Restangular by itself
angular.module('angularjs-starter').controller('NewCtrl', function($scope, Restangular) {
// My controller
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment