subscribe Questions
1
For a recent application, I want to provide the ability to subscribe to a calendar feed while staying on the android device. Going to calendar.google.com and manually adding the http link (ics) isn...
2
Solved
I listen to 2 forms via 2 [formControl] "toppings":array and "toppings2":array.
I must have the 2 values of the forms in the same time. So i combine my two observables with "CombineLatest"
My cod...
Diaghilev asked 5/9, 2018 at 9:24
10
Solved
When I run the linter it says:
subscribe is deprecated: Use an observer instead of an error callback
Code from this angular app:
this.userService.updateUser(data).pipe(
tap(() => {bla bla bla...
Discretional asked 2/4, 2019 at 10:8
4
My site allows users to subscribe to MailChimp lists using the API via Drupal MailChimp module. But if a user unsubscribes by following the link in the email, and subsequently decides to re-subscri...
Hawks asked 10/2, 2017 at 12:22
3
I want to wait for one function to finish before executing the function next to it.
I have one function called getData() in which http call occurs which returns an observable. The second function c...
Monika asked 28/7, 2020 at 14:52
2
I have seen three ways to "listen" for changes to a value via an observable / call APIs to fetch data from the backend.
One of these ways has "next:" :
this.MySubscription = thi...
Gracie asked 14/2, 2023 at 14:8
4
Solved
I feel like this scenario should be in the Angular 2 docs, but I can't find it anywhere.
Here's the scenario
submit a form (create object) that is invalid on the server
server returns a 400 bad...
4
Solved
What's the way to simplify something like the following code example?
I can't find the right operator.. could anyone give a short example?
this.returnsObservable1(...)
.subscribe(
success => ...
Coldblooded asked 19/3, 2017 at 15:46
4
Solved
I am very new to rxjs and was just wondering is it ok to setup a class property by piping the stream and tapping it, or it should i do it in the subscribe. To me either way works, just wonder if it...
Minimize asked 9/3, 2018 at 0:27
3
Solved
I'm using a shareDataService using BehaviorSubject like below. My problem is that every time I call the service's next() method the listener subscription in any other component is called several ti...
Adim asked 23/7, 2018 at 11:54
2
Solved
I hope everyone just doing fine. Can, please someone clearly explains which one to choose among pipe and subscribe, and why? when it comes to not only getting the response but also to initialize so...
5
Solved
I want to achieve that if i call the Obervable.subscribe(Action1) method, it does not throw OnErrorNotImplementedException anywhere, but if i call Obervable.subscribe(Action1, Action1), the second ...
3
I want to use observable to be able to run my code synchronously, I want to return a true value after i get the icons from the server so that i can use it. How do i do it ?
ngOnInit() {
this.addI...
Byebye asked 7/3, 2020 at 9:44
1
This question is very common, some prefer to use in service some in component:
Angular 2 subscribe from component or service?: it says never do the manual subscription means from component!
If we...
2
Solved
is there something like q.all to resolve all http api requests in angular2?
In angular1, I can do something like this:
var promises = [api.getA(),api.getB()];
$q.all(promises).then(function(respo...
Construct asked 11/5, 2016 at 19:53
3
Newbie question. Can't find a previous answer.
I want to build a simple pump controller with Alexa. Would like Alexa to report pump state.
Simplest approach is Alexa -> lambda -> publish_to_Iot. ...
Misconceive asked 31/12, 2017 at 18:12
0
I'm trying to test my front-end code without the back-end api using observables.
In my component's template I have a textarea. Ultimately I need to send the textarea content to back-end api using h...
Devoirs asked 1/12, 2018 at 0:13
2
Solved
I am working on a search functionality for my project. Once the user types anything on the search bar; on any change in search text I'll be sending the text to backend for validation and receive a ...
Woolfell asked 22/11, 2018 at 13:30
4
Solved
Problem
I subscribe to an httpClient.get observable twice. However, this means that my call gets executed twice. Why is this?
Proof
For every subscribe() I do, I get another line in the login page...
5
Solved
I need to call a method after get the data from the http post request
service: request.service.TS
get_categories(number){
this.http.post( url, body, {headers: headers, withCredentials:true})
....
Ludie asked 15/2, 2017 at 0:38
4
Solved
I'm banging my head against the wall with observables. Almost all of the documentation I can find is in the older rxjs syntax.
I have an API call which is an observable. I'm calling it elsewhere ...
Centaury asked 29/8, 2018 at 15:25
1
Solved
I'm getting the following error while trying to subscribe in the second time to an EventEmitter after that ngOnDestroy was invoked and called unsubscribe:
ngOnInit() {
this.route.params.subscri...
Vera asked 4/8, 2018 at 13:36
2
Solved
I'm using an auth guard in angular 5 to check if the user should be able to navigate to a specific page. I am getting an error related to returning an observable:
A function whose declared type is...
Simasimah asked 30/7, 2018 at 13:48
3
I want to return a boolean value ,but the variable in the "if" condition is undefined.
function() {
this.menuDataService.getMenu()
.subscribe(res => {
this.mainMenus = res.MainMenus;
conso...
Seamaid asked 6/7, 2017 at 13:31
1
Solved
I am trying to subscribe to channel using native WebSocket in vanilla javascript (without using any library) [as I have just read it's possible but I am not sure - please correct me if I'm wrong].
...
Florindaflorine asked 25/3, 2018 at 8:45
1 Next >
© 2022 - 2025 — McMap. All rights reserved.