feat(examples): adds static dart hello world example.

Use gulp examples/pub.serve to start up the server and go to
http://localhost:8080/index_static.html to see the static app.
This commit is contained in:
Rado Kirov
2014-12-02 19:14:48 -08:00
parent 0f3134acd4
commit c59cc8631a
6 changed files with 120 additions and 5 deletions

View File

@ -0,0 +1,20 @@
<!doctype html>
<html>
<head>
<title>Hello Angular 2.0 (Dart Static)</title>
<script type="application/dart" src="main_static.dart"></script>
<script src="packages/browser/dart.js"></script>
</head>
<body>
<hello-app>
Loading...
</hello-app>
</body>
</html>
<!-- to run do:
1) gulp build
2) gulp examples/pub.serve
3) open localhost:8080/index_static.html in dartium or chrome.
TODO(rado): merge with JS's index.html in ../src/hello_world/
-->

View File

@ -1,4 +1,11 @@
import 'packages/examples/hello_world/app.dart' as HelloWorldApp;
import 'package:examples/hello_world/app.dart' as HelloWorldApp;
import 'package:reflection/reflection_capabilities.dart';
import 'package:reflection/reflection.dart';
// TODO(rado): templatize and make reusable for all examples.
main() => HelloWorldApp.main();
main() {
// enable mirrors and reflection.
// see static_app.js for an example of a static app.
reflector.reflectionCapabilities = new ReflectionCapabilities();
HelloWorldApp.main();
}

View File

@ -0,0 +1,4 @@
import 'packages/examples/hello_world/static_app.dart' as HelloWorldApp;
// TODO(rado): templatize and make reusable for all examples.
main() => HelloWorldApp.main();