feat(dart/transform): Introduce @AngularEntrypoint()
This commit is contained in:
parent
3e364b0d41
commit
6b2ef25c69
|
@ -9,6 +9,7 @@ export 'package:angular2/core.dart'
|
|||
hide forwardRef, resolveForwardRef, ForwardRefFn;
|
||||
export 'package:angular2/common.dart';
|
||||
export 'package:angular2/instrumentation.dart';
|
||||
export 'package:angular2/src/core/angular_entrypoint.dart' show AngularEntrypoint;
|
||||
export 'package:angular2/src/core/application_tokens.dart'
|
||||
hide APP_COMPONENT_REF_PROMISE, APP_ID_RANDOM_PROVIDER;
|
||||
export 'package:angular2/src/platform/dom/dom_tokens.dart';
|
||||
|
|
|
@ -3,3 +3,4 @@
|
|||
* @deprecated
|
||||
*/
|
||||
export {bootstrap} from 'angular2/platform/browser';
|
||||
export {AngularEntrypoint} from 'angular2/src/core/angular_entrypoint';
|
||||
|
|
|
@ -3,3 +3,4 @@
|
|||
* @deprecated
|
||||
*/
|
||||
export {bootstrapStatic} from 'angular2/platform/browser_static';
|
||||
export {AngularEntrypoint} from 'angular2/src/core/angular_entrypoint';
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
export {AngularEntrypoint} from 'angular2/src/core/angular_entrypoint';
|
||||
export {
|
||||
BROWSER_PROVIDERS,
|
||||
ELEMENT_PROBE_BINDINGS,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
export {AngularEntrypoint} from 'angular2/src/core/angular_entrypoint';
|
||||
export {
|
||||
BROWSER_PROVIDERS,
|
||||
ELEMENT_PROBE_BINDINGS,
|
||||
|
@ -10,13 +11,13 @@ export {
|
|||
disableDebugTools
|
||||
} from 'angular2/src/platform/browser_common';
|
||||
|
||||
import {Type, isPresent, CONST_EXPR} from 'angular2/src/facade/lang';
|
||||
import {Type, isPresent} from 'angular2/src/facade/lang';
|
||||
import {Promise} from 'angular2/src/facade/promise';
|
||||
import {
|
||||
BROWSER_PROVIDERS,
|
||||
BROWSER_APP_COMMON_PROVIDERS
|
||||
} from 'angular2/src/platform/browser_common';
|
||||
import {ComponentRef, platform, reflector} from 'angular2/core';
|
||||
import {ComponentRef, platform} from 'angular2/core';
|
||||
|
||||
/**
|
||||
* An array of providers that should be passed into `application()` when bootstrapping a component
|
||||
|
|
|
@ -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) {}
|
||||
}
|
|
@ -76,6 +76,8 @@ var NG_ALL = [
|
|||
'AbstractControlDirective.valid',
|
||||
'AbstractControlDirective.value',
|
||||
'AbstractControlDirective.path',
|
||||
'AngularEntrypoint',
|
||||
'AngularEntrypoint.name',
|
||||
'AppRootUrl',
|
||||
'AppRootUrl.value',
|
||||
'AppRootUrl.value=',
|
||||
|
|
Loading…
Reference in New Issue