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

Commit

Permalink
doc(sample): add samples to stackblitz (#1059)
Browse files Browse the repository at this point in the history
  • Loading branch information
JiaLiPassion authored and mhevery committed Jun 18, 2018
1 parent 2aab9c8 commit 14cfc68
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ zone.js patched most standard web APIs (such as DOM events, `XMLHttpRequest`, ..
We are adding support to some nonstandard APIs, such as MediaQuery and
Notification. Please see [NON-STANDARD-APIS.md](NON-STANDARD-APIS.md) for more details.

## Examples

You can find some samples to describe how to use zone.js in [SAMPLE.md](SAMPLE.md).

## Modules

zone.js patches the async APIs described above, but those patches will have some overhead.
Expand Down
23 changes: 23 additions & 0 deletions SAMPLE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Sample

### Basic Sample

use `zone.js` and `long-stack-trace-zone.js` to display longStackTrace information in html.
[basic](https://stackblitz.com/edit/zonejs-basic?file=index.js)

### Async Task Counting Sample

use `zone.js` to monitor async tasks and print the count info.
[counting](https://stackblitz.com/edit/zonejs-counting?file=index.js)

### Profiling Sample

use `zone.js` to profiling sort algorithm.
[profiling](https://stackblitz.com/edit/zonejs-profiling?file=index.js)

### Throttle with longStackTrace

use `long-stack-trace-zone` to display full flow of complex async operations such as throttle XHR requests.
[throttle](https://stackblitz.com/edit/zonejs-throttle?file=index.js)


0 comments on commit 14cfc68

Please sign in to comment.