发行与AngularJS和财务报价 [英] Issue with AngularJS and financial quote

查看:171
本文介绍了发行与AngularJS和财务报价的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题,我的角度要求。

I got an issue with my Angular request.

angular.module('google-chart-example', []).controller("MainCtrl", function ($scope,$http,$log) {

    $scope.infos = "";

    //$http.get('http://ip.jsontest.com')
    //$http.get('https://finance.google.com/finance/info?q=TSE:PXT')
    $http.get('http://query.yahooapis.com/v1/public/yql?q=select * from yahoo.finance.quotes where symbol in ("AAPL")&format=json')
    .success(function(data) {
            //alert ("toto");
            $scope.infos = data;

    })
    .error(function(data) {
            alert ("data="+data);
        $scope.infos = data;
    });


});

$ http.get('H T T P上://ip.jsontest.com')
==>这是一款做工精细..没有烦恼

$http.get('h t t p ://ip.jsontest.com') ==> this is one is working fine .. no trouble

$ http.get('H T T P上S://finance.google.com/finance/info Q = TSE:PXT')
==>这个人是不是工作,我没有得到结果。

$http.get('h t t p s://finance.google.com/finance/info?q=TSE:PXT') ==> This one is not working, i got no result

$ http.get('?H ​​T T P上://query.yahooapis.com/v1/public/yql Q = SELECT * FROM yahoo.finance.quotes其中(AAPL)及标志;格式= JSON')
==>这一次,我得到了一个答案,但它告诉我的表不存在:
{错误:{郎:EN-US,说明:没有定义,发现表yahoo.finance.quote}}
(我试过报价行情答:相同的结果)

$http.get('h t t p://query.yahooapis.com/v1/public/yql?q=select * from yahoo.finance.quotes where symbol in ("AAPL")&format=json') ==> This one, i got an answer but it's telling me the table doesn't exist : {"error":{"lang":"en-US","description":"No definition found for Table yahoo.finance.quote"}} (I tried quote ans quotes : same result)

任何想法,为什么我不能找回我的价格?

Any idea why i'm not able to retrieve my prices ?

我的HTML:

<html xmlns="http://www.w3.org/1999/html">
<head>

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.18/angular.js"</script>
<script src="index3.js"></script>
 </head>
<body ng-app="google-chart-example" ng-controller="MainCtrl">
coucou <br>
{{infos}}
</body>
</html>

谢谢,
萨科

thanks, Nicolas

PS:在H T T T p空间是不被SO识别地址

PS : Spaces for h t t t p is for addresses not to be recognized by SO

推荐答案

您特林查询yahoo.finance.quotes,但查询需要放在yahoo.finance.quote

You tring to query yahoo.finance.quotes, however the query need to be on yahoo.finance.quote

select * from yahoo.finance.quote

这篇关于发行与AngularJS和财务报价的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆