3
愚かな質問をする場合は、事前に謝罪してください。私は検索して、私が探していた答えを見つけることができませんでした。プロビズから観察可能なものへの結果
私は、引数としての私の観察可能に渡される約束で返されインデックスの値が必要です。その後、チェーンにこれらの観測可能にflatMap使用観測可能に約束
deleteFavorite(token: string, recipe: Recipe) {
const userId = this.authService.getActiveUser().uid;
let index: number;
this.indexOfFavoriteToBeRemoved(recipe)
.then(
index => {
console.log(index)
}
);
return this.http.delete(this.databaseAddress + userId + '/' + index + '.json?auth=' + token)
.map(
(response: Response) => {
return response.json();
}
);
}