0
@EmberJS 2.6EmberJS:非同期モデル
は、現在の問題は、呼び出しがアプリを返すために時間がかかりすぎる場合は、基本的に「凍結」されていること、である
import Ember from 'ember';
export default Ember.Route.extend({
model: function() {
...
var ajax_response = Ember.$.ajax(url, {
"type": 'POST',
"async": false,
"headers": {
"Authorization": _auth_header
},
"data": JSON.stringify(data),
"contentType": "application/json"
});
if (ajax_response.hasOwnProperty("responseJSON")) {
var response = ajax_response.responseJSON;
if (response.hasOwnProperty("status") && response.status === success_status) {
response = response.result;
if (typeof response === "object") {
return response;
}
}
}
}
});
これをやってイム。私は、ページがレンダリングされた、1非同期作業にコードのこの部分を変更したい、との約束を移入するために戻ったとき:
{{#each model as |transaction|}}
....