JSFiddle - React, Tailwind, and code Playground

by honzajde

HTML

<div ng-app ng-controller="jsonp_example">
    <button ng-click="doRequest()">Make JSONP request</button>
</div>

JavaScript

// open your console

function jsonp_example($scope, $http) {
    $scope.doRequest = function() {
        var url = "http://public-api.wordpress.com/rest/v1/sites/wtmpeachtest.wordpress.com/posts?callback=JSON_CALLBACK";

        $http.jsonp(url).success(function(data){
            console.log("data: "+data.found);
        });
    };

}