feat(dart/transform): Introduce @AngularEntrypoint()

This commit is contained in:
Tim Blasi
2015-11-20 16:35:55 -08:00
committed by vsavkin
parent 3e364b0d41
commit 6b2ef25c69
7 changed files with 34 additions and 5 deletions

View File

@ -0,0 +1,22 @@
import {CONST} from 'angular2/src/facade/lang';
/**
* Marks a function or method as an Angular 2 entrypoint. Only necessary in Dart code.
*
* The optional `name` parameter will be reflected in logs when the entry point is processed.
*
* See [the wiki][] for detailed documentation.
* [the wiki]: https://github.com/angular/angular/wiki/Angular-2-Dart-Transformer#entry_points
*
* ## Example
*
* ```
* @AngularEntrypoint("name-for-debug")
* void main() {
* bootstrap(MyComponent);
* }
*/
@CONST()
export class AngularEntrypoint {
constructor(public name?: String) {}
}