Skip to content

Tag: angular

Get Reponse Code and JSON Response in Fetch

I have following Code to get the Response from the API. Now I want a response if the data are successfully send to the server. My first idea was to do it with the response code. If it is 200 it is successfull. The other idea is, to make it with a try catch statement. Getting the response from the

Stop navigation if another link is clicked Angular

I have a form in angular and when it is submitted, there is a redirection to homepage after X seconds. Here is the service containing the redirection method: Here is the submit method: I’d like to know how can I stop redirectToHome() if suppose an user click somewhere else in the menu before x seconds h…