Created
February 15, 2016 16:54
-
-
Save Anderson-Juhasc/7c4b741907e09f2a8d23 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html lang="en" ng-app="app"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
</head> | |
<body> | |
<div ng-controller="ctrl"></div> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js"></script> | |
<script type="text/javascript"> | |
var app = angular.module( "app", [] ); | |
app.controller("ctrl", function($http) { | |
var query = 'select * from html where url = "https://api.blinktrade.com/api/v1/BRL/ticker"' | |
, url = "http://query.yahooapis.com/v1/public/yql?q=" + encodeURIComponent(query) + "&format=json"; | |
$http.get(url).then(function(response) { | |
console.log(response); | |
var data = JSON.parse(response.data.query.results.body); | |
console.log(data); | |
}); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment