Created
April 10, 2013 00:14
-
-
Save mgonto/5350606 to your computer and use it in GitHub Desktop.
Restangular configuration
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
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