1

there.

According to the comments for ZoneSpec interface (located in zone.ts file), onInvoke hook has to receive currentZone as second parameter. And if I create interceptor zone, then reference to that zone should be passed as second parameter.

Here is an excerpt from documentation:

/* Allows interception of the callback invocation.
@param parentZoneDelegate Delegate which performs the parent [ZoneSpec] operation.
@param currentZone The current [Zone] where the current interceptor has beed declared.
@param targetZone The [Zone] which originally received the request.
@param delegate The argument passed into the run method.
@param applyThis The argument passed into the run method.
@param applyArgs The argument passed into the run method.
@param source The argument passed into the run method.
*/
onInvoke?:
    (parentZoneDelegate: ZoneDelegate, currentZone: Zone, targetZone: Zone, delegate: Function,
     applyThis: any, applyArgs: any[], source: string) => any;

I created an interceptZone, which I suppose should be passed as current zone to my hook method. But for some reason I receive the same value as targetZone. I created a demo HERE, which depicts the described problem.

Am I missing something?

Mistalis
  • 17,793
  • 13
  • 73
  • 97
davidoff
  • 2,175
  • 3
  • 16
  • 23

1 Answers1

0

That was a bug in the library. Developers confirmed that. Details are HERE

davidoff
  • 2,175
  • 3
  • 16
  • 23