APIコールからデータを取得するクラスに2つの関数があります。ここで同じクラスを持つ別の関数でAngular2関数を呼び出し、最初の関数を2番目に使用する
まず機能が
getQuotes(){
this.quoteService.getQuotes()
.subscribe(
quotes => {
this.quotCode = this.quotes.BasicDetails[0].QuotCode;
}
});
}
である第二の機能
getOption(){
this.quoteService.getOptions()
.subscribe(
options => {
})
}
私は最初の関数から
this.quotCode = this.quotes.BasicDetails[0].QuotCode;
とに基づいて、この行からデータを取得したいですthis.quotCode
getOption()
は、渡すパラメータが異なり、diffを取得します。応答も。私は誰もが私を助けてくださいすることができgetQuotes()
constuctor()
で
を呼んでいる?第二の機能に
をthis.quotCode
を使用する必要がありますか ありがとう
@trichetricheここでお手伝いできますか? –