0
なぜ(にconsole.log出力に基づいて)この作業決意匿名関数対javascriptの約束の解決機能
return new Promise(function(resolve) {
var test = function() {
console.log('rrrr');
return $timeout(function(){},100);
}
resolve(test());
}
があるしかし、これはないですか?
return new Promise(function(resolve) {
resolve(function() {
console.log('rrrr');
return $timeout(function(){},100);
});
}
が、これは単なる例示のためですか?いずれのスニペットも本当に意味をなさないからです。 –
'$ timeout'は何を返しますか? –
@torazaburoそれはPromiseを返す – Gerard