Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.factory('sveKlupeServiceFactory', ['$resource',
- function($resource){
- var data = $resource('xxxxxx', {klupa: '@klupa'},{
- query: { method: 'GET', isArray:false},
- save : {
- method : 'POST',
- url : "//api-dev.steora.com/control-board/smartbenches",
- headers: {
- 'Content-Type': 'application/x-ww-form-urlencoded'
- },
- }
- });
- return data;
- .controller('klupeController', ['$scope', 'sveKlupeServiceFactory', function ($scope,sveKlupeServiceFactory){
- sveKlupeServiceFactory.query(function(res){
- $scope.klupe = res.smart_benches;
- });
- $scope.setDataForKlupa = function(klupaID){
- $scope.currentKlupa = sveKlupeServiceFactory.get({klupa: klupaID});
- };
- $scope.addKlupa = function(){ sveKlupeServiceFactory.save($scope.addKlupa););};
- No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access. The response had HTTP status code 400.
- Access-Control-Allow-Headers: Content-Type
- Access-Control-Allow-Methods: GET, POST, OPTIONS
- Access-Control-Allow-Origin: *
Add Comment
Please, Sign In to add comment