Skip to content

Instantly share code, notes, and snippets.

@pankajparkar
Created February 27, 2019 13:08
Show Gist options
  • Save pankajparkar/1ab93721db964177191b5702edf04807 to your computer and use it in GitHub Desktop.
Save pankajparkar/1ab93721db964177191b5702edf04807 to your computer and use it in GitHub Desktop.
zonejs
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