Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Wrong currentZone value inside of onInvoke hook #538

@davidich

Description

@davidich

Hi, there.

According to comments I found in zone.ts file, onInvoke hook has to receive currentZone as second parameter:

`/**

  • 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?

Thanks,
Oleksiy

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions