Get started with restangular CDN
MIT licensed
AngularJS service, Restangular: simplifies REST API CRUD operations with fluent interface.
Tags:- angular
- client
- browser
- restful
- resources
- rest
- api
Stable version
Copied!
How to start using restangular CDN
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/angular@1.7.9/angular.min.js"></script>
<script src="https://cdn.cdnhub.io/restangular/1.6.0/restangular.min.js"></script>
<script src="app.js"></script>
</head>
<body ng-app="myApp">
<div ng-controller="MyController">
<button ng-click="fetchData()">Fetch Data</button>
<ul>
<li ng-repeat="item in data">{{ item.name }}</li>
</ul>
</div>
</body>
</html>
// app.js
angular.module('myApp', ['restangular'])
.controller('MyController', ['$scope', 'Restangular', function($scope, Restangular) {
const restangular = Restangular.withConfig(function(RestangularProvider) {
RestangularProvider.setBaseUrl('/api');
});
$scope.fetchData = function() {
restangular.all('items').getList().then(function(items) {
$scope.data = items;
});
};
}]);
Copied!
Copied!
All versions
0.3.2
0.4.2
0.4.4
0.4.5
0.4.6
0.5.0
0.5.1
0.5.2
0.5.3
0.5.4
0.5.5
0.6.0
0.6.1
0.6.2
0.6.3
0.6.4
0.6.5
0.6.6
0.6.7
0.6.8
0.6.9
0.7.0
0.7.2
0.7.3
0.7.5
0.8.0
0.8.2
0.8.4
0.8.7
0.8.8
0.8.9
1.0.1
1.0.11
1.0.2
1.0.3
1.0.5
1.0.7
1.0.9
1.1.0
1.1.3
1.1.5
1.1.6
1.1.7
1.1.8
1.2.0
1.2.1
1.2.2
1.3.0
1.3.1
1.4.0
1.5.1
1.5.2
*** 1.6.0
1.6.1