angularJS $ http无法解析来自服务器的复杂json响应

时间:2014-03-19 01:33:48

标签: javascript json angularjs http get

我试图通过服务器显示一些我的网址作为json响应的图片。 使用thisthat等示例非常有用,但我似乎无法让它发挥作用。 我认为原因可能是上面的例子解析了简单的json对象,而我尝​​试的响应更复杂。我尝试使用ng-repeater和ng-src指令处理它,并且还使用this example

这不是http问题(状态是200)或json源问题(我已经用Jsonlint检查了响应,它没问题)。

我的剧本:

            $http.get(path)
                .then(function(res) {
                    console.log("$http succeeded");
                    $scope.thumbList = res.data;
            });

我的HTML:

    <div>
        <ul ng-repeat="item in thumbList.response.resultset.items" >
            <li>
                 <img ng-src="{{item.images.0.thumb_uri}}">
            </li>
        </ul>

    </div>

0 个答案:

没有答案
相关问题