diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000000..8c51d3b287 --- /dev/null +++ b/examples/README.md @@ -0,0 +1 @@ +Various canonical example applications for AngularDart. diff --git a/examples/hello_world/LICENSE b/examples/hello_world/LICENSE new file mode 100644 index 0000000000..fa7351c678 --- /dev/null +++ b/examples/hello_world/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2014-2016 Dart Project Authors https://www.dartlang.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/examples/hello_world/README.md b/examples/hello_world/README.md new file mode 100644 index 0000000000..621161aa99 --- /dev/null +++ b/examples/hello_world/README.md @@ -0,0 +1 @@ +An example of a simple "Hello World", using the normal bootstrap process. diff --git a/examples/hello_world/web/main.dart b/examples/hello_world/web/main.dart new file mode 100644 index 0000000000..56fe58c05d --- /dev/null +++ b/examples/hello_world/web/main.dart @@ -0,0 +1,13 @@ +import 'package:angular/angular.dart'; + +import 'main.template.dart' as ng_generated; + +void main() { + bootstrapStatic(HelloWorldComponent, [], ng_generated.initReflector); +} + +@Component( + selector: 'hello-world', + template: 'Hello World', +) +class HelloWorldComponent {} diff --git a/examples/hello_world_no_reflector/LICENSE b/examples/hello_world_no_reflector/LICENSE new file mode 100644 index 0000000000..fa7351c678 --- /dev/null +++ b/examples/hello_world_no_reflector/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2014-2016 Dart Project Authors https://www.dartlang.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/examples/hello_world_no_reflector/README.md b/examples/hello_world_no_reflector/README.md new file mode 100644 index 0000000000..21b668bdd3 --- /dev/null +++ b/examples/hello_world_no_reflector/README.md @@ -0,0 +1 @@ +An example of a simple "Hello World", using an experimental bootstrap process. diff --git a/examples/hello_world_no_reflector/web/main.dart b/examples/hello_world_no_reflector/web/main.dart new file mode 100644 index 0000000000..f40cecd0ea --- /dev/null +++ b/examples/hello_world_no_reflector/web/main.dart @@ -0,0 +1,14 @@ +import 'package:angular/angular.dart'; +import 'package:angular/experimental.dart'; + +import 'main.template.dart' as ng_generated; + +void main() { + bootstrapFactory(ng_generated.HelloWorldComponentNgFactory); +} + +@Component( + selector: 'hello-world', + template: 'Hello World', +) +class HelloWorldComponent {}