問題タブ [angular-observable]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
1 に答える
358 参照

angular - asyncPipeの使用時にngModelがプロパティを更新しない

を使用するようにアプリを更新しましたObservables。これを除いて、これまでのところすべてが機能します。

なぜかingredient.amountもう更新されません。

asyncが関与している場合、これを特別な方法で処理する必要がありますか?

0 投票する
2 に答える
6881 参照

angular - Angular 5 HTTPリクエストから正しいObservableタイプを取得します(なぜ常にObservableなのですか??)

I'm having a little trouble getting the correct observable type from an http.get request. Here is the function I'm having trouble on:

getMovie(tit

I'm having a little trouble getting the correct observable type from an http.get request. Here is the function I'm having trouble on:

As you can see I want to receive and Observable of the class Movie from my backend api using the parameters 'title' and 'year'. The problem is that the reponse always comes back with the type Observable<Object> and not Observable<Movie>.

I'm aware that I could create a new Movie instance giving it the properties recieved from the list. The problem with that is that my movie class has properties that are optional. Here is my movie class:

Does anybody know an easy way to get the response to be of the type Observable<Movie> instead of Observable<Object>


I have come with solution after a lot R&D and googling . It is not possible in single query, we have to apply 2 query