Reputation: 475
I am building an angular 2 application. In this on submit of a page I am calling web service via HTTP POST and navigating to the next screen based on the service response.
During this I would like to show loading indicator that shows the progress of the service request. Both the i/p and o/p are of JSON format and doesn't involve any image uploading.
Is there any way of doing this? Please help and thanks in advance.
Upvotes: 1
Views: 3582
Reputation: 179
If it is a larger request consider using the reportProgress. If it's a fast request I would just set an animation to be active while a variable you set to true when sending the request, and to false when you get a response.
Upvotes: 1