mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 10:49:00 +00:00
pkg/js: add link to example
Review URL: https://codereview.chromium.org/1406093002 .
This commit is contained in:
parent
647ada25ed
commit
e32d7d7029
3 changed files with 17 additions and 1 deletions
|
@ -20,6 +20,8 @@ If you are passing a Dart function to a JavaScript API, you must wrap it using
|
|||
|
||||
### Examples
|
||||
|
||||
There is a [full example](https://github.com/dart-lang/sdk/tree/master/pkg/js/example) hosted with the `package:js` source code.
|
||||
|
||||
#### Calling methods
|
||||
|
||||
```dart
|
||||
|
|
14
pkg/js/example/README.md
Normal file
14
pkg/js/example/README.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
An example of using [Chart.js](aoeU).
|
||||
|
||||
This example is ported from [this sample](https://github.com/nnnick/Chart.js/blob/b8691c9581bff0eeecb34f98e678dc045a18f33e/samples/line.html) in the `Chart.js` repository.
|
||||
|
||||
To view the example, run `pub serve example` from the root directory of this project – the directory containing `pubspec.yaml`.
|
||||
|
||||
```console
|
||||
> pub serve example
|
||||
Loading source assets...
|
||||
Serving js example on http://localhost:8080
|
||||
Build completed successfully
|
||||
```
|
||||
|
||||
You can view it with Dartium or any other browser.
|
|
@ -1,5 +1,5 @@
|
|||
name: js
|
||||
version: 0.6.0-beta.3
|
||||
version: 0.6.0-beta.4
|
||||
authors:
|
||||
- Dart Team <misc@dartlang.org>
|
||||
description: Access JavaScript from Dart.
|
||||
|
|
Loading…
Reference in a new issue