Angular jsonp return

0

What's wrong with this request. The error that appears in the console is $ sce: insecurl. Untrusted source resource ...

$scope.pegaCNPJ = function () {
        var cnpj = $("#clienteCNPJ").val().replace(/[^\d]+/g, '');
        $http.jsonp("https://www.receitaws.com.br/v1/cnpj/" + cnpj).then(function (data) {
            console.log($scope.data);
            console.log(data.nome);
        });
    };

Someone else has had the same problem

    
asked by anonymous 05.07.2018 / 02:26

0 answers