Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Dspace7 Angular
Manage
Activity
Members
Labels
Plan
Issues
42
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vtechworks
Dspace7 Angular
Commits
383dff73
Commit
383dff73
authored
5 years ago
by
Art Lowel
Browse files
Options
Downloads
Patches
Plain Diff
add comment to this.zone.runOutsideAngular
parent
a970aeaa
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/core/data/request.service.ts
+7
-0
7 additions, 0 deletions
src/app/core/data/request.service.ts
with
7 additions
and
0 deletions
src/app/core/data/request.service.ts
+
7
−
0
View file @
383dff73
...
...
@@ -148,6 +148,13 @@ export class RequestService {
* @param {RestRequest} request The request to send out
*/
configure
<
T
extends
CacheableObject
>
(
request
:
RestRequest
):
void
{
/**
* Since this method doesn't return anything, is used very often and has
* problems with actions being dispatched to the store but not reduced before
* that info is needed again, we may as well run it in a separate zone. That way
* it won't block the UI, and actions have a better chance of being already
* processed when the next isCachedOrPending call comes
*/
this
.
zone
.
runOutsideAngular
(()
=>
{
const
isGetRequest
=
request
.
method
===
RestRequestMethod
.
GET
;
if
(
!
isGetRequest
||
request
.
forceBypassCache
||
!
this
.
isCachedOrPending
(
request
))
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment