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:
20
modules/examples/web/index_static.html
Normal file
20
modules/examples/web/index_static.html
Normal 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/
|
||||
-->
|
@ -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();
|
||||
}
|
||||
|
4
modules/examples/web/main_static.dart
Normal file
4
modules/examples/web/main_static.dart
Normal 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();
|
Reference in New Issue
Block a user