私のAPIは以下の通りです。 どうすればこのようなスコープに渡すことができますか? JSONデータを以下のような配列に渡そうとしていますが、シンボルを渡すだけです。それは達成可能ですか?APIをスコープ配列に渡しますか?
$scope.sellers = ["12312", "2324", "B23244", "2322en"]
[
{
"id": "59a7ef64053bfcf561d6bde0",
"symbol": "12121",
"clearingVenue": null,
"description": "testing",
"address": "6/9-13 smith St",
"startAt": null,
"endAt": null,
"city": "north",
"auctionDate": 1504137600000,
"term": "M",
"state": "Australia",
"zipCode": "2334",
"country": "Australia",
"relatedSymbols": ["foo"],
"showUser": true
}
]
this.fetchContracts = function() {
var date = new Date().toISOString();
$http.get('/api/contracts', {params: {auctionDate: date}})
.success(function (result) {
result && result.length && ($scope.contracts = result);
});
};
具体的には具体的にはどうすればいいですか... –
JSONデータを渡すことです。シンボルを配列に挿入します。 – Fenici