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

Commit 9a0aa4a

Browse files
KwintenPmhevery
authored andcommitted
fix(doc): Fixed the home page example. (#348)
1 parent 8fffe70 commit 9a0aa4a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Diff for: README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ You can run code within a zone with `zone.run`.
2525
Tasks scheduled (with `setTimeout`, `setInterval`, or event listeners) stay within that zone.
2626

2727
```javascript
28-
zone.fork().run(function () {
29-
zone.inTheZone = true;
28+
Zone.current.fork({}).run(function () {
29+
Zone.current.inTheZone = true;
3030

31-
setTimeout(function () {
32-
console.log('in the zone: ' + !!zone.inTheZone);
33-
}, 0);
31+
setTimeout(function () {
32+
console.log('in the zone: ' + !!Zone.current.inTheZone);
33+
}, 0);
3434
});
3535

36-
console.log('in the zone: ' + !!zone.inTheZone);
36+
console.log('in the zone: ' + !!Zone.current.inTheZone);
3737
```
3838

3939
The above will log:

0 commit comments

Comments
 (0)