diff --git a/modules/angular2/platform/browser.ts b/modules/angular2/platform/browser.ts index fd2f63d32f..17b186adfd 100644 --- a/modules/angular2/platform/browser.ts +++ b/modules/angular2/platform/browser.ts @@ -1,4 +1,4 @@ -export {AngularEntrypoint} from 'angular2/src/core/angular_entrypoint'; +export * from 'angular2/src/core/angular_entrypoint'; export { BROWSER_PROVIDERS, CACHED_TEMPLATE_PROVIDER, diff --git a/modules/angular2/platform/browser_static.ts b/modules/angular2/platform/browser_static.ts index de7604c62e..06f5db4f57 100644 --- a/modules/angular2/platform/browser_static.ts +++ b/modules/angular2/platform/browser_static.ts @@ -1,4 +1,4 @@ -export {AngularEntrypoint} from 'angular2/src/core/angular_entrypoint'; +export * from 'angular2/src/core/angular_entrypoint'; export { BROWSER_PROVIDERS, ELEMENT_PROBE_PROVIDERS, diff --git a/modules/angular2/platform/worker_app.ts b/modules/angular2/platform/worker_app.ts index d168056d58..4f3304ffbf 100644 --- a/modules/angular2/platform/worker_app.ts +++ b/modules/angular2/platform/worker_app.ts @@ -33,7 +33,6 @@ export { } from 'angular2/src/web_workers/shared/service_message_broker'; export {PRIMITIVE} from 'angular2/src/web_workers/shared/serializer'; export * from 'angular2/src/web_workers/shared/message_bus'; -export {AngularEntrypoint} from 'angular2/src/core/angular_entrypoint'; export {WORKER_APP_ROUTER} from 'angular2/src/web_workers/worker/router_providers'; export function workerAppPlatform(): PlatformRef { diff --git a/modules/angular2/src/core/angular_entrypoint.dart b/modules/angular2/src/core/angular_entrypoint.dart new file mode 100644 index 0000000000..80faed2786 --- /dev/null +++ b/modules/angular2/src/core/angular_entrypoint.dart @@ -0,0 +1,23 @@ +library angular2.src.core.angular_entrypoint; + +/** + * 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); + * } + * ``` + */ +class AngularEntrypoint { + final String name; + const AngularEntrypoint([this.name]); +} diff --git a/modules/angular2/src/core/angular_entrypoint.ts b/modules/angular2/src/core/angular_entrypoint.ts index 2d6f3c2fec..7887b7c435 100644 --- a/modules/angular2/src/core/angular_entrypoint.ts +++ b/modules/angular2/src/core/angular_entrypoint.ts @@ -1,23 +1,3 @@ -import {CONST} from 'angular2/src/facade/lang'; +import 'angular2/src/facade/lang'; // kept so that Tools know this is an ES6 file -/** - * 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) {} -} +// TS does not have AngularEntrypoint diff --git a/modules/angular2/test/public_api_spec.ts b/modules/angular2/test/public_api_spec.ts index 295e935d0b..a7644bf57b 100644 --- a/modules/angular2/test/public_api_spec.ts +++ b/modules/angular2/test/public_api_spec.ts @@ -299,7 +299,7 @@ var NG_INSTRUMENTATION = ['wtfCreateScope', 'wtfEndTimeRange', 'wtfLeave', 'WtfScopeFn:dart', 'wtfStartTimeRange']; var NG_PLATFORM_BROWSER = [ - 'AngularEntrypoint', + 'AngularEntrypoint:dart', 'BROWSER_APP_PROVIDERS', 'BROWSER_PROVIDERS', 'BrowserDomAdapter', diff --git a/tools/public_api_guard/public_api_spec.ts b/tools/public_api_guard/public_api_spec.ts index ebdea575d7..d7b222314b 100644 --- a/tools/public_api_guard/public_api_spec.ts +++ b/tools/public_api_guard/public_api_spec.ts @@ -1091,8 +1091,6 @@ const UPGRADE = [ ]; const BROWSER = [ - 'AngularEntrypoint', - 'AngularEntrypoint.constructor(name:String)', 'BrowserDomAdapter', 'BrowserDomAdapter.addClass(element:any, className:string):any', 'BrowserDomAdapter.adoptNode(node:Node):any',