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

Commit 14cfc68

Browse files
JiaLiPassionmhevery
authored andcommitted
doc(sample): add samples to stackblitz (#1059)
1 parent 2aab9c8 commit 14cfc68

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

Diff for: README.md

+4
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ zone.js patched most standard web APIs (such as DOM events, `XMLHttpRequest`, ..
4343
We are adding support to some nonstandard APIs, such as MediaQuery and
4444
Notification. Please see [NON-STANDARD-APIS.md](NON-STANDARD-APIS.md) for more details.
4545

46+
## Examples
47+
48+
You can find some samples to describe how to use zone.js in [SAMPLE.md](SAMPLE.md).
49+
4650
## Modules
4751

4852
zone.js patches the async APIs described above, but those patches will have some overhead.

Diff for: SAMPLE.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Sample
2+
3+
### Basic Sample
4+
5+
use `zone.js` and `long-stack-trace-zone.js` to display longStackTrace information in html.
6+
[basic](https://stackblitz.com/edit/zonejs-basic?file=index.js)
7+
8+
### Async Task Counting Sample
9+
10+
use `zone.js` to monitor async tasks and print the count info.
11+
[counting](https://stackblitz.com/edit/zonejs-counting?file=index.js)
12+
13+
### Profiling Sample
14+
15+
use `zone.js` to profiling sort algorithm.
16+
[profiling](https://stackblitz.com/edit/zonejs-profiling?file=index.js)
17+
18+
### Throttle with longStackTrace
19+
20+
use `long-stack-trace-zone` to display full flow of complex async operations such as throttle XHR requests.
21+
[throttle](https://stackblitz.com/edit/zonejs-throttle?file=index.js)
22+
23+

0 commit comments

Comments
 (0)