0

I'm pretty new to Angular (and express.js). I worked on a project and came to a point where I needed/wanted to make more than one get a request from a single component. As far as I know, the component links (is that the right word? -> "/login" for example) are used to know where the requests belong to.

So, if I made two get requests from the same component, both would end up in the same function in express, not?

Is there a way to create multiple requests in a single component that get handled as independent requests from express (just like they were from different components )?

1
  • 1
    If you're new to Rxjs, you should read up on cold observables. Cold observables start executing when they're subscribed to. This makes it convenient to invoke as many cold observables (which make HTTP calls) as you like, and they will effectively be called asynchronously and in parallel. Commented Jul 12, 2021 at 3:22

1 Answer 1

1

if you want to call different controllers in the backend in the same component, then store the data in two different arrays by creating separate calls for the controllers in the same component. and check whether the controllers that calling has unique names and unique functions for the data going to receive.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.