Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
応用可能性の低そうなメモ。 AngularJSの$httpでは、戻り値のpromiseについて、通常のthenのほかに、success / errorを使うことができます。これはどうしてなのでしょうか?AngularJSのpromiseの隠し仕様で、戻り値の関数名を指定することができるのか、それとも隠しメソッドとして、sucess / errorを持っているのか?などと妄想が膨らんでしまいます。 そこで、AngularJSのコードを読んでみると、大したことはなく、 promise.success = function(fn) { promise.then(function(response) { fn(response.data, response.status, response.headers, config); }); return promise; }; promise.error
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く