You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have set up NgProgressRouterModule, NgProgressHttpModule in my app.module:
This works fine when I call my http service using a button clic for example:
doHttpCall() {
//.. calling http service
}
But when I call it at the component initlialization:
ngAfterViewInit() {
doHttpCall();
}
And then refresh the page, it doesn't work
the router progress bar shows and then hides correctly
my http request is still pending but no progress bar is shown.
PS: it works fine when I navigate away from the view and come back, but no routing progress occurs.
It also works when I add a timeout before the http is automatically called and refresh the page.
The log given by the failure
No errors.
Desired functionality
Mention any other details that might be useful
The text was updated successfully, but these errors were encountered:
This is happening because both NgProgressRouterModule and NgProgressHttpModule are using the same NgProgress instance, and the router event is calling complete() before the http request is finished.
I will investigate a way to set progressbar instance for each one
I'm having a behavior similar to this when I instantiate in app.module.tsNgProgressHttpModule and NgProgressRouterModule the progress bar stops working when I have some HttpClient call in ngAfterViewInit
Bug Report or Feature Request (mark with an
x
)OS and Version?
Versions
Repro steps:
I have set up NgProgressRouterModule, NgProgressHttpModule in my app.module:
This works fine when I call my http service using a button clic for example:
But when I call it at the component initlialization:
And then refresh the page, it doesn't work
PS: it works fine when I navigate away from the view and come back, but no routing progress occurs.
It also works when I add a timeout before the http is automatically called and refresh the page.
The log given by the failure
No errors.
Desired functionality
Mention any other details that might be useful
The text was updated successfully, but these errors were encountered: