I have a cUrl
which gives JSON
data I want to use that curl in angularjs but It's giving me error
"Error: $sce:insecurl
Processing of a Resource from Untrusted Source Blocked"
Code:
var App = angular.module('App', [ ]);
App.config(['$sceDelegateProvider', function($sceDelegateProvider) {
$sceDelegateProvider.resourceUrlWhitelist([
'self',
'http://125.99.157.180/suez/dispweigh.php',
]);
}]);
App.controller('AboutCtrl', function ($scope, $http, $sce){
var url = $sce.trustAsResourceUrl('http://125.99.157.180/suez/dispweigh.php');
$http.get(url)
.then(function (data) {
$scope.result = data;
});
});