Angularjs $http call gives "no access-control-allow-origin header" error -


i calling 1 java using $http in angularjs getting error in chrome:

xmlhttprequest cannot load http://192.168.1.104:8080/etts/abilityscore?userid=1. no 'access-control-allow-origin' header present on requested resource. origin 'http://localhost:8080' therefore not allowed access.

my code is:

var countryapp = angular.module('countryapp', []);          countryapp.controller('countryctrl', function ($scope, $http){              alert("eee")            $http.get('http://192.168.1.104:8080/etts/abilityscore?userid=1    ').success(function(data) {              $scope.countries = data;                var sum = 0;                 var tval = 0;                for(var = 0; < data.length; i++){                  sum += parseint(data[i]['getval'], 10);                  tval += parseint(data[i]['totalval'], 10);                   } 


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -