Angular 2のhttp.postを使用してデータを送信し、結果を取得しています。結果が戻ったら、私は関数を実行したいと思いますが、匿名関数は機能しません。これをどのように達成するのですか?TypeScriptで匿名関数を実行するにはどうすればよいですか?
スニペット:
this.http.post("/login/login", this.model)
.subscribe(res => function() {
console.log('a', this.res);
},
error => function (e) {
console.log(e);
},
() => function() {
console.log("3");
});