Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add before task / after task semantics similar to zone.js #16

Open
kraman opened this issue Jul 11, 2014 · 2 comments
Open

Add before task / after task semantics similar to zone.js #16

kraman opened this issue Jul 11, 2014 · 2 comments

Comments

@kraman
Copy link
Contributor

kraman commented Jul 11, 2014

Open questions:

  • Does beforeTask throwing end the zone? or just prevent the immediate task from running?
  • Zone lib provides beforeTask & afterTask as hooks that be defined when creating the zone. Does the + and - sugar form zone.js make sense to add here?
  • Zones in this lib are independent and carry their own hooks rather than inherit from parent. Users have be explicit about what hooks to run. What is the use-case where inheritance is useful?
  • Assume the following
RootZone
  Zone1
  |-EventEmitter
  +-Zone2
    +-Zone3
      +-listener

When I emit from zone1, would before/after be executed only on zone3 or on zone2 as well?

@piscisaureus
Copy link
Contributor

I guess this is for @btford to comment on.

My feeling is that conceptually it probably should happen in both zone2 and zone3, but that may be inefficient?

@weibon
Copy link

weibon commented Dec 17, 2017

ngzone重写的异步监听滑动那一块是怎么禁掉的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants