私はangle.jsを使ってこのJSON(1)をレンダリングしています1.6、タイトルと説明が読み込まれているようですが、イメージプロパティからurlを取得できません。現在、次のように表示されています。角でオブジェクトデータをレンダリングするときにJSONタグを取り除く
<img ng-src="{"original": "https://xxx-export.s3.amazonaws.com/images/products/2016/12/product_1003_2.jpg"}">
テンプレートでレンダリングするURLを取得するにはどうすればよいですか?
(1)これは私のJSONオブジェクトのためのリファレンスです:
var items = [
{
"id": 61,
"title": "Title 1",
"description": "Desc",
"images": [
{
"original": "https://xxx-export.s3.amazonaws.com/images/products/2016/12/product_1003_2.jpg"
},
{
"original": "https://xxx-export.s3.amazonaws.com/images/products/2016/12/product_1003_5.jpg"
},
{
"original": "https://xxx-export.s3.amazonaws.com/images/products/2016/12/product_1003_3.jpg"
}
]
];
(2)これはあなたが持っているデータは、私のテンプレートで
<div ng-repeat="item in Item">
<img ng-src="{$item.images[0]$}" />
<h4>{$item.title$}</h4>
<p> {$item.description$} </p>
</div>
私はあなたが '
' –