question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Blockuihttpmodule issue

See original GitHub issue

i use BlockUIHttpModule with this configuration: BlockUIHttpModule.forRoot({ blockAllRequestsInProgress: true })

Say i have multiple request like: xService.getAll().subscripe(); yService.getAll().subscripe();

what happens is block ui works until on of them return first then stop. expected => it will block ui until all request return.

also another case: if i fire request in subscription of another like: xService.getAll().subscripe(x => { yService.getAll().subscripe(); });

what happens it fires with xservice and when return it stops and doesn’t fire any more even with second request. expected => it will start with first request and stop after return. and start again with second one and stop after return.

may be i have mistake in something or misunderstanding so, guide me.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
kuuurt13commented, Mar 29, 2019

@nagiramadan you are right it looks like it is no longer honoring that setting. I will work this weekend to put in a fix so that settings is honored again.

That being said, that setting was added by a contributor to keep backwards compatibility when they attempted to fix the issue you were having but to me it should be the default and only behaviors since it is confusing. I think I will be removing the setting and making it the default behavior in 3.0.0 since it should always block until all requests are complete and it also covers your scenario for a series of request xService.getAll().subscribe(x => { yService.getAll().subscribe(); }).

Also, since 2.0 the core library now queues all calls see here. So if you have 2 requests called at the same time (start() is called twice) then blocking shouldn’t stop until both have finished (stop() is called twice). I’m not sure why anyone would ever want it to stop after the first one since the whole point of the module it to block for all requests.

0reactions
kuuurt13commented, Oct 27, 2019

Closing due to inactivity. Please feel free to open back up if needed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ng-block-ui not working with Angular 7 concatmap
This issue occurs for sequential HTTP calls (usually with await) wherein the second request is not blocked by ng-block-ui.
Read more >
Ng Block Ui Issue 126 (forked) - StackBlitz
BlockUIHttpModule.forRoot({. // Change to "false" to see how the. behavior changes. blockAllRequestsInProgress: true,. // "true" is the default in (3.0.0).
Read more >
ng-block-ui - npm
Weekly Downloads. 16,117. Version. 3.0.2. License. MIT. Unpacked Size. 871 kB. Total Files. 115. Issues. 6. Pull Requests. 51. Last publish.
Read more >
Anass Guendef – Medium
In today's subject, I am going to present a classic problem when dealing with databases that use sequences. It's about “Sequence desynchronization”.
Read more >
ng-block-ui not working with Angular 7 concatmap
I'm using NgBlockUI and BlockUIHttpModule with ... This issue occurs for sequential HTTP calls (usually with await) wherein the second ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found