Created
July 10, 2018 08:11
-
-
Save JiaLiPassion/9b0efdc9f97b590c72c1eee8a73fe7da to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var zoneA = Zone.current.fork({name: 'zoneA'}); | |
function callback() { | |
console.log('callback is invoked in context', Zone.current.name); | |
} | |
zoneA.run(function() { | |
console.log('I am in context', Zone.current.name); | |
setTimeout(zoneA.wrap(callback), 100); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment