Created
February 27, 2019 13:08
-
-
Save pankajparkar/1ab93721db964177191b5702edf04807 to your computer and use it in GitHub Desktop.
zonejs
This file contains 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 myZoneSpec = { | |
beforeTask: function () { | |
console.log('Before task'); | |
}, | |
afterTask: function () { | |
console.log('After task'); | |
} | |
}; | |
var myZone = zone.fork(myZoneSpec); | |
myZone.run(function() { | |
console.log('My task successfully got executed.') | |
}); | |
// Output: | |
// Before task | |
// My task successfully got executed. | |
// After task |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment