したがって、ここに、 CompoundJSフレームワークに基づくアプリケーションとそのコントローラーがあります。
load('application');
action('index', function () {
someMethodWithAsyncCallback({}, function () {
/* async preparing some params for template */
});
anotherMethodWithAsyncCallback({}, function () {
/* async preparing another params for template */
});
// another couple of async calls
// rendering index template
render('index', { /* using async params */ });
});
index
問題は、すべてのコールバックの終了後にテンプレートをレンダリングする方法です。
たぶん、この回答$.when
で説明されているjQueryのようなものがありますか?