From 39ecd01b8684370666586ba35a4a12c0f109807d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mi=C5=A1ko=20Hevery?=
Date: Wed, 25 May 2016 15:00:05 -0700
Subject: [PATCH] chore: audit @angular/core API classification (#8808)
---
modules/@angular/compiler/core_private.ts | 3 +-
.../@angular/compiler/src/compile_metadata.ts | 3 +-
.../src/directive_lifecycle_reflector.ts | 3 +-
.../compiler/src/directive_resolver.ts | 3 +-
.../compiler/src/metadata_resolver.ts | 5 +-
.../compiler/src/output/output_interpreter.ts | 2 +-
.../@angular/compiler/src/pipe_resolver.ts | 4 +-
.../@angular/compiler/src/view_resolver.ts | 3 +-
.../@angular/compiler_cli/src/core_private.ts | 2 +
.../src/static_reflection_capabilities.ts | 5 +-
modules/@angular/core/index.ts | 1 -
modules/@angular/core/private_export.ts | 7 +
.../core/src/application_common_providers.ts | 1 +
modules/@angular/core/src/application_ref.ts | 9 +
.../@angular/core/src/application_tokens.ts | 5 +
.../change_detection/change_detection_util.ts | 2 +
.../change_detection/change_detector_ref.ts | 3 +
.../core/src/change_detection/constants.ts | 1 +
.../differs/default_iterable_differ.ts | 6 +
.../differs/default_keyvalue_differ.ts | 3 +
.../differs/iterable_differs.ts | 3 +
.../differs/keyvalue_differs.ts | 1 +
modules/@angular/core/src/debug/debug_node.ts | 12 +
modules/@angular/core/src/di.ts | 6 +-
modules/@angular/core/src/di/decorators.dart | 6 +
modules/@angular/core/src/di/decorators.ts | 12 +
modules/@angular/core/src/di/forward_ref.ts | 2 +
modules/@angular/core/src/di/injector.ts | 3 +
modules/@angular/core/src/di/metadata.ts | 7 +
modules/@angular/core/src/di/opaque_token.ts | 1 +
modules/@angular/core/src/di/provider.ts | 3 +
.../core/src/di/reflective_exceptions.ts | 7 +
.../core/src/di/reflective_injector.ts | 1 +
.../@angular/core/src/di/reflective_key.ts | 1 +
.../core/src/di/reflective_provider.ts | 1 +
.../core/src/linker/component_factory.ts | 8 +-
.../core/src/linker/component_resolver.ts | 1 +
.../@angular/core/src/linker/element_ref.ts | 1 +
.../@angular/core/src/linker/exceptions.ts | 3 +
.../@angular/core/src/linker/query_list.ts | 1 +
.../src/linker/systemjs_component_resolver.ts | 1 +
.../@angular/core/src/linker/template_ref.ts | 1 +
.../core/src/linker/view_container_ref.ts | 1 +
modules/@angular/core/src/linker/view_ref.ts | 4 +
modules/@angular/core/src/metadata.dart | 17 +-
modules/@angular/core/src/metadata.ts | 25 +
modules/@angular/core/src/metadata/di.ts | 7 +
.../@angular/core/src/metadata/directives.ts | 7 +
.../core/src/metadata/lifecycle_hooks.ts | 12 +
modules/@angular/core/src/metadata/view.ts | 1 +
.../core/src/platform_common_providers.ts | 1 +
.../core/src/platform_directives_and_pipes.ts | 2 +
modules/@angular/core/src/profile/profile.ts | 4 +
modules/@angular/core/src/render/api.ts | 8 +-
.../core/src/testability/testability.ts | 3 +
modules/@angular/core/src/util/decorators.ts | 1 +
modules/@angular/core/src/zone/ng_zone.ts | 1 +
.../@angular/core/src/zone/ng_zone_impl.ts | 1 +
modules/@angular/facade/src/async.ts | 1 +
.../@angular/facade/src/exception_handler.ts | 1 +
modules/@angular/facade/src/exceptions.ts | 4 +
modules/@angular/facade/src/lang.js | 470 ------------------
modules/@angular/facade/src/lang.ts | 1 +
.../integration_test/public_api_spec.ts | 38 +-
.../@angular/platform-browser/core_private.ts | 1 +
.../router-deprecated/core_private.ts | 5 +-
.../lifecycle/route_lifecycle_reflector.ts | 2 +-
.../router-deprecated/src/route_registry.ts | 3 +-
modules/@angular/router/src/core_private.ts | 5 +-
.../router/src/directives/router_link.ts | 21 +-
.../router/src/directives/router_outlet.ts | 4 +-
modules/@angular/router/src/recognize.ts | 2 +-
72 files changed, 245 insertions(+), 561 deletions(-)
delete mode 100644 modules/@angular/facade/src/lang.js
diff --git a/modules/@angular/compiler/core_private.ts b/modules/@angular/compiler/core_private.ts
index de7757bd35..f63d28e797 100644
--- a/modules/@angular/compiler/core_private.ts
+++ b/modules/@angular/compiler/core_private.ts
@@ -58,7 +58,8 @@ export var pureProxy10: typeof t.pureProxy10 = r.pureProxy10;
export var castByValue: typeof t.castByValue = r.castByValue;
export type Console = t.Console;
export var Console: typeof t.Console = r.Console;
-
+export var reflector: t.Reflector = r.reflector;
+export type Reflector = t.Reflector;
export type NoOpAnimationPlayer = t.NoOpAnimationPlayer;
export var NoOpAnimationPlayer: typeof t.NoOpAnimationPlayer = r.NoOpAnimationPlayer;
export type AnimationPlayer = t.AnimationPlayer;
diff --git a/modules/@angular/compiler/src/compile_metadata.ts b/modules/@angular/compiler/src/compile_metadata.ts
index 4f961741b3..ae7ad7df47 100644
--- a/modules/@angular/compiler/src/compile_metadata.ts
+++ b/modules/@angular/compiler/src/compile_metadata.ts
@@ -1,4 +1,5 @@
-import {ChangeDetectionStrategy, ViewEncapsulation, reflector} from '@angular/core';
+import {ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core';
+import {reflector} from '../core_private';
import {
CHANGE_DETECTION_STRATEGY_VALUES,
VIEW_ENCAPSULATION_VALUES,
diff --git a/modules/@angular/compiler/src/directive_lifecycle_reflector.ts b/modules/@angular/compiler/src/directive_lifecycle_reflector.ts
index 88d97b4066..db7db64c4f 100644
--- a/modules/@angular/compiler/src/directive_lifecycle_reflector.ts
+++ b/modules/@angular/compiler/src/directive_lifecycle_reflector.ts
@@ -7,9 +7,8 @@ import {
AfterContentChecked,
AfterViewInit,
AfterViewChecked,
- reflector
} from '@angular/core';
-import {LifecycleHooks} from '../core_private';
+import {reflector, LifecycleHooks} from '../core_private';
import {Type} from '../src/facade/lang';
import {MapWrapper} from '../src/facade/collection';
diff --git a/modules/@angular/compiler/src/directive_resolver.ts b/modules/@angular/compiler/src/directive_resolver.ts
index cfcb2c1d49..19174373d6 100644
--- a/modules/@angular/compiler/src/directive_resolver.ts
+++ b/modules/@angular/compiler/src/directive_resolver.ts
@@ -11,9 +11,8 @@ import {
ViewChildrenMetadata,
ContentChildMetadata,
ViewChildMetadata,
- reflector
} from '@angular/core';
-import {ReflectorReader} from '../core_private';
+import {ReflectorReader, reflector} from '../core_private';
import {Type, isPresent, stringify} from '../src/facade/lang';
import {BaseException} from '../src/facade/exceptions';
diff --git a/modules/@angular/compiler/src/metadata_resolver.ts b/modules/@angular/compiler/src/metadata_resolver.ts
index aa4de38fb2..4f717d138f 100644
--- a/modules/@angular/compiler/src/metadata_resolver.ts
+++ b/modules/@angular/compiler/src/metadata_resolver.ts
@@ -1,6 +1,5 @@
import {
AttributeMetadata,
- ReflectiveDependency,
OptionalMetadata,
ComponentMetadata,
SelfMetadata,
@@ -9,18 +8,16 @@ import {
Provider,
PLATFORM_DIRECTIVES,
PLATFORM_PIPES,
- reflector,
Injectable,
Inject,
Optional,
ViewMetadata,
- NoAnnotationError,
QueryMetadata,
resolveForwardRef,
InjectMetadata,
ViewQueryMetadata
} from '@angular/core';
-import {constructDependencies, LIFECYCLE_HOOKS_VALUES, ReflectorReader} from '../core_private';
+import {LIFECYCLE_HOOKS_VALUES, ReflectorReader, reflector} from '../core_private';
import {
Type,
isBlank,
diff --git a/modules/@angular/compiler/src/output/output_interpreter.ts b/modules/@angular/compiler/src/output/output_interpreter.ts
index 5d8f826edc..11aacd80cd 100644
--- a/modules/@angular/compiler/src/output/output_interpreter.ts
+++ b/modules/@angular/compiler/src/output/output_interpreter.ts
@@ -1,4 +1,4 @@
-import {reflector} from '@angular/core';
+import {reflector} from '../../core_private';
import {isPresent, IS_DART, FunctionWrapper} from '../../src/facade/lang';
import {ObservableWrapper} from '../../src/facade/async';
import {BaseException, unimplemented} from '../../src/facade/exceptions';
diff --git a/modules/@angular/compiler/src/pipe_resolver.ts b/modules/@angular/compiler/src/pipe_resolver.ts
index 5d47ceed01..fe56da4719 100644
--- a/modules/@angular/compiler/src/pipe_resolver.ts
+++ b/modules/@angular/compiler/src/pipe_resolver.ts
@@ -1,6 +1,6 @@
-import {resolveForwardRef, Injectable, PipeMetadata, reflector} from '@angular/core';
+import {resolveForwardRef, Injectable, PipeMetadata} from '@angular/core';
-import {ReflectorReader} from '../core_private';
+import {ReflectorReader, reflector} from '../core_private';
import {Type, isPresent, stringify} from '../src/facade/lang';
import {BaseException} from '../src/facade/exceptions';
diff --git a/modules/@angular/compiler/src/view_resolver.ts b/modules/@angular/compiler/src/view_resolver.ts
index ce905b08c0..baecfa139b 100644
--- a/modules/@angular/compiler/src/view_resolver.ts
+++ b/modules/@angular/compiler/src/view_resolver.ts
@@ -2,10 +2,9 @@ import {
Injectable,
ViewMetadata,
ComponentMetadata,
- reflector,
} from '@angular/core';
-import {ReflectorReader} from '../core_private';
+import {ReflectorReader, reflector} from '../core_private';
import {Type, stringify, isBlank, isPresent} from '../src/facade/lang';
import {BaseException} from '../src/facade/exceptions';
diff --git a/modules/@angular/compiler_cli/src/core_private.ts b/modules/@angular/compiler_cli/src/core_private.ts
index c2a9ec2f38..9f0e9f69ff 100644
--- a/modules/@angular/compiler_cli/src/core_private.ts
+++ b/modules/@angular/compiler_cli/src/core_private.ts
@@ -5,3 +5,5 @@ export var ReflectorReader: typeof t.ReflectorReader = r.ReflectorReader;
export type ReflectionCapabilities = t.ReflectionCapabilities;
export var ReflectionCapabilities: typeof t.ReflectionCapabilities = r.ReflectionCapabilities;
+
+export var reflector: typeof t.reflector = r.reflector;
diff --git a/modules/@angular/compiler_cli/src/static_reflection_capabilities.ts b/modules/@angular/compiler_cli/src/static_reflection_capabilities.ts
index ab40bbed91..f0d7cb1c8b 100644
--- a/modules/@angular/compiler_cli/src/static_reflection_capabilities.ts
+++ b/modules/@angular/compiler_cli/src/static_reflection_capabilities.ts
@@ -1,5 +1,4 @@
-import {reflector} from '@angular/core';
-import {ReflectionCapabilities} from './core_private';
+import {ReflectionCapabilities, reflector} from './core_private';
import {StaticReflector} from './static_reflector';
export class StaticAndDynamicReflectionCapabilities {
@@ -39,4 +38,4 @@ export class StaticAndDynamicReflectionCapabilities {
function isStaticType(type: any): boolean {
return typeof type === 'object' && type.name && type.filePath;
-}
\ No newline at end of file
+}
diff --git a/modules/@angular/core/index.ts b/modules/@angular/core/index.ts
index b35e4e5736..c58361073d 100644
--- a/modules/@angular/core/index.ts
+++ b/modules/@angular/core/index.ts
@@ -32,7 +32,6 @@ export * from './src/change_detection';
export * from './src/platform_directives_and_pipes';
export * from './src/platform_common_providers';
export * from './src/application_common_providers';
-export * from './src/reflection/reflection';
export {
wtfCreateScope,
wtfLeave,
diff --git a/modules/@angular/core/private_export.ts b/modules/@angular/core/private_export.ts
index d5382cc3bb..6d8ea5d1bf 100644
--- a/modules/@angular/core/private_export.ts
+++ b/modules/@angular/core/private_export.ts
@@ -20,6 +20,8 @@ import * as debug from './src/debug/debug_renderer';
import * as provider_util from './src/di/provider_util';
import * as console from './src/console';
import {Provider} from './index';
+import * as reflection from './src/reflection/reflection';
+import {Reflector} from './src/reflection/reflection';
import {
NoOpAnimationPlayer as NoOpAnimationPlayer_,
@@ -103,6 +105,9 @@ export declare namespace __core_private_types__ {
export var castByValue: typeof view_utils.castByValue;
export type Console = console.Console;
export var Console: typeof console.Console;
+ export var reflector: typeof reflection.reflector;
+ export type Reflector = reflection.Reflector;
+ export var Reflector: typeof reflection.Reflector;
export type NoOpAnimationPlayer = NoOpAnimationPlayer_;
export var NoOpAnimationPlayer: typeof NoOpAnimationPlayer_;
export type AnimationPlayer = AnimationPlayer_;
@@ -178,6 +183,8 @@ export var __core_private__ = {
pureProxy10: view_utils.pureProxy10,
castByValue: view_utils.castByValue,
Console: console.Console,
+ reflector: reflection.reflector,
+ Reflector: reflection.Reflector,
NoOpAnimationPlayer: NoOpAnimationPlayer_,
AnimationPlayer: AnimationPlayer_,
NoOpAnimationDriver: NoOpAnimationDriver_,
diff --git a/modules/@angular/core/src/application_common_providers.ts b/modules/@angular/core/src/application_common_providers.ts
index 62c5b55c4c..dd834379b1 100644
--- a/modules/@angular/core/src/application_common_providers.ts
+++ b/modules/@angular/core/src/application_common_providers.ts
@@ -16,6 +16,7 @@ let __unused: Type; // avoid unused import when Type union types are erased
/**
* A default set of providers which should be included in any Angular
* application, regardless of the platform it runs onto.
+ * @stable
*/
export const APPLICATION_COMMON_PROVIDERS: Array =
/*@ts2dart_const*/[
diff --git a/modules/@angular/core/src/application_ref.ts b/modules/@angular/core/src/application_ref.ts
index 0720c421c9..a9145a4d32 100644
--- a/modules/@angular/core/src/application_ref.ts
+++ b/modules/@angular/core/src/application_ref.ts
@@ -14,6 +14,7 @@ import {ChangeDetectorRef} from './change_detection/change_detector_ref';
/**
* Create an Angular zone.
+ * @experimental
*/
export function createNgZone(): NgZone {
return new NgZone({enableLongStackTrace: assertionsEnabled()});
@@ -25,6 +26,7 @@ var _inPlatformCreate: boolean = false;
/**
* Creates a platform.
* Platforms have to be eagerly created via this function.
+ * @experimental
*/
export function createPlatform(injector: Injector): PlatformRef {
if (_inPlatformCreate) {
@@ -47,6 +49,7 @@ export function createPlatform(injector: Injector): PlatformRef {
/**
* Checks that there currently is a platform
* which contains the given token as a provider.
+ * @experimental
*/
export function assertPlatform(requiredToken: any): PlatformRef {
var platform = getPlatform();
@@ -62,6 +65,7 @@ export function assertPlatform(requiredToken: any): PlatformRef {
/**
* Dispose the existing platform.
+ * @experimental
*/
export function disposePlatform(): void {
if (isPresent(_platform) && !_platform.disposed) {
@@ -71,6 +75,7 @@ export function disposePlatform(): void {
/**
* Returns the current platform.
+ * @experimental
*/
export function getPlatform(): PlatformRef {
return isPresent(_platform) && !_platform.disposed ? _platform : null;
@@ -79,6 +84,7 @@ export function getPlatform(): PlatformRef {
/**
* Shortcut for ApplicationRef.bootstrap.
* Requires a platform to be created first.
+ * @experimental
*/
export function coreBootstrap(componentFactory: ComponentFactory,
injector: Injector): ComponentRef {
@@ -90,6 +96,7 @@ export function coreBootstrap(componentFactory: ComponentFactory,
* Resolves the componentFactory for the given component,
* waits for asynchronous initializers and bootstraps the component.
* Requires a platform to be created first.
+ * @experimental
*/
export function coreLoadAndBootstrap(componentType: Type,
injector: Injector): Promise> {
@@ -109,6 +116,7 @@ export function coreLoadAndBootstrap(componentType: Type,
*
* A page's platform is initialized implicitly when {@link bootstrap}() is called, or
* explicitly by calling {@link createPlatform}().
+ * @stable
*/
export abstract class PlatformRef {
/**
@@ -170,6 +178,7 @@ export class PlatformRef_ extends PlatformRef {
* A reference to an Angular application running on a page.
*
* For more about Angular applications, see the documentation for {@link bootstrap}.
+ * @stable
*/
export abstract class ApplicationRef {
/**
diff --git a/modules/@angular/core/src/application_tokens.ts b/modules/@angular/core/src/application_tokens.ts
index d9dd03717f..1964562976 100644
--- a/modules/@angular/core/src/application_tokens.ts
+++ b/modules/@angular/core/src/application_tokens.ts
@@ -9,6 +9,7 @@ import {Math, StringWrapper} from '../src/facade/lang';
* If you need to avoid randomly generated value to be used as an application id, you can provide
* a custom value via a DI provider configuring the root {@link Injector}
* using this token.
+ * @experimental
*/
export const APP_ID: any = /*@ts2dart_const*/ new OpaqueToken('AppId');
@@ -18,6 +19,7 @@ function _appIdRandomProviderFactory() {
/**
* Providers that will generate a random APP_ID_TOKEN.
+ * @experimental
*/
export const APP_ID_RANDOM_PROVIDER =
/*@ts2dart_const*/ /* @ts2dart_Provider */ {
@@ -32,18 +34,21 @@ function _randomChar(): string {
/**
* A function that will be executed when a platform is initialized.
+ * @experimental
*/
export const PLATFORM_INITIALIZER: any =
/*@ts2dart_const*/ new OpaqueToken("Platform Initializer");
/**
* A function that will be executed when an application is initialized.
+ * @experimental
*/
export const APP_INITIALIZER: any =
/*@ts2dart_const*/ new OpaqueToken("Application Initializer");
/**
* A token which indicates the root directory of the application
+ * @experimental
*/
export const PACKAGE_ROOT_URL: any =
/*@ts2dart_const*/ new OpaqueToken("Application Packages Root URL");
diff --git a/modules/@angular/core/src/change_detection/change_detection_util.ts b/modules/@angular/core/src/change_detection/change_detection_util.ts
index 888b678886..f827d6a68b 100644
--- a/modules/@angular/core/src/change_detection/change_detection_util.ts
+++ b/modules/@angular/core/src/change_detection/change_detection_util.ts
@@ -34,6 +34,7 @@ export function devModeEqual(a: any, b: any): boolean {
* return WrappedValue.wrap(this._latestValue); // this will force update
* }
* ```
+ * @stable
*/
export class WrappedValue {
constructor(public wrapped: any) {}
@@ -60,6 +61,7 @@ export class ValueUnwrapper {
/**
* Represents a basic change from a previous to a new value.
+ * @stable
*/
export class SimpleChange {
constructor(public previousValue: any, public currentValue: any) {}
diff --git a/modules/@angular/core/src/change_detection/change_detector_ref.ts b/modules/@angular/core/src/change_detection/change_detector_ref.ts
index c218719873..8ae682db84 100644
--- a/modules/@angular/core/src/change_detection/change_detector_ref.ts
+++ b/modules/@angular/core/src/change_detection/change_detector_ref.ts
@@ -1,3 +1,6 @@
+/**
+ * @stable
+ */
export abstract class ChangeDetectorRef {
/**
* Marks all {@link ChangeDetectionStrategy#OnPush} ancestors as to be checked.
diff --git a/modules/@angular/core/src/change_detection/constants.ts b/modules/@angular/core/src/change_detection/constants.ts
index ee7d3fc037..ea0ac9efa9 100644
--- a/modules/@angular/core/src/change_detection/constants.ts
+++ b/modules/@angular/core/src/change_detection/constants.ts
@@ -28,6 +28,7 @@ export enum ChangeDetectorState {
/**
* Describes within the change detector which strategy will be used the next time change
* detection is triggered.
+ * @stable
*/
export enum ChangeDetectionStrategy {
/**
diff --git a/modules/@angular/core/src/change_detection/differs/default_iterable_differ.ts b/modules/@angular/core/src/change_detection/differs/default_iterable_differ.ts
index 93cda5bc70..cc0fc02f2f 100644
--- a/modules/@angular/core/src/change_detection/differs/default_iterable_differ.ts
+++ b/modules/@angular/core/src/change_detection/differs/default_iterable_differ.ts
@@ -24,6 +24,9 @@ export class DefaultIterableDifferFactory implements IterableDifferFactory {
var trackByIdentity = (index: number, item: any) => item;
+/**
+ * @stable
+ */
export class DefaultIterableDiffer implements IterableDiffer {
private _length: number = null;
private _collection = null;
@@ -532,6 +535,9 @@ export class DefaultIterableDiffer implements IterableDiffer {
}
}
+/**
+ * @stable
+ */
export class CollectionChangeRecord {
currentIndex: number = null;
previousIndex: number = null;
diff --git a/modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.ts b/modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.ts
index 1b3a9ab545..6ca8d454cb 100644
--- a/modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.ts
+++ b/modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.ts
@@ -335,6 +335,9 @@ export class DefaultKeyValueDiffer implements KeyValueDiffer {
}
+/**
+ * @stable
+ */
export class KeyValueChangeRecord {
previousValue: any = null;
currentValue: any = null;
diff --git a/modules/@angular/core/src/change_detection/differs/iterable_differs.ts b/modules/@angular/core/src/change_detection/differs/iterable_differs.ts
index d88d5e205f..6777066614 100644
--- a/modules/@angular/core/src/change_detection/differs/iterable_differs.ts
+++ b/modules/@angular/core/src/change_detection/differs/iterable_differs.ts
@@ -7,6 +7,8 @@ import {Provider, SkipSelfMetadata, OptionalMetadata} from '../../di';
/**
* A strategy for tracking changes over time to an iterable. Used for {@link NgFor} to
* respond to changes in an iterable by effecting equivalent changes in the DOM.
+ *
+ * @stable
*/
export interface IterableDiffer {
diff(object: any): any;
@@ -31,6 +33,7 @@ export interface IterableDifferFactory {
/**
* A repository of different iterable diffing strategies used by NgFor, NgClass, and others.
* @ts2dart_const
+ * @stable
*/
export class IterableDiffers {
/*@ts2dart_const*/
diff --git a/modules/@angular/core/src/change_detection/differs/keyvalue_differs.ts b/modules/@angular/core/src/change_detection/differs/keyvalue_differs.ts
index 3d132e875e..6bfa77496d 100644
--- a/modules/@angular/core/src/change_detection/differs/keyvalue_differs.ts
+++ b/modules/@angular/core/src/change_detection/differs/keyvalue_differs.ts
@@ -23,6 +23,7 @@ export interface KeyValueDifferFactory {
/**
* A repository of different Map diffing strategies used by NgClass, NgStyle, and others.
* @ts2dart_const
+ * @stable
*/
export class KeyValueDiffers {
/*@ts2dart_const*/
diff --git a/modules/@angular/core/src/debug/debug_node.ts b/modules/@angular/core/src/debug/debug_node.ts
index 08e644e4be..062596ab2d 100644
--- a/modules/@angular/core/src/debug/debug_node.ts
+++ b/modules/@angular/core/src/debug/debug_node.ts
@@ -5,6 +5,9 @@ import {RenderDebugInfo} from '../render/api';
export class EventListener { constructor(public name: string, public callback: Function){}; }
+/**
+ * @experimental
+ */
export class DebugNode {
nativeNode: any;
listeners: EventListener[];
@@ -46,6 +49,9 @@ export class DebugNode {
inject(token: any): any { return this.injector.get(token); }
}
+/**
+ * @experimental
+ */
export class DebugElement extends DebugNode {
name: string;
properties: {[key: string]: string};
@@ -129,6 +135,9 @@ export class DebugElement extends DebugNode {
}
}
+/**
+ * @experimental
+ */
export function asNativeElements(debugEls: DebugElement[]): any {
return debugEls.map((el) => el.nativeElement);
}
@@ -162,6 +171,9 @@ function _queryNodeChildren(parentNode: DebugNode, predicate: Predicate();
+/**
+ * @experimental
+ */
export function getDebugNode(nativeNode: any): DebugNode {
return _nativeNodeToDebugNode.get(nativeNode);
}
diff --git a/modules/@angular/core/src/di.ts b/modules/@angular/core/src/di.ts
index fcc23b29c1..e636d2322a 100644
--- a/modules/@angular/core/src/di.ts
+++ b/modules/@angular/core/src/di.ts
@@ -10,8 +10,7 @@ export {
InjectableMetadata,
SelfMetadata,
HostMetadata,
- SkipSelfMetadata,
- DependencyMetadata
+ SkipSelfMetadata
} from './di/metadata';
// we have to reexport * because Dart and TS export two different sets of types
@@ -25,15 +24,12 @@ export {
Binding,
ProviderBuilder,
bind,
-
Provider,
provide
} from './di/provider';
export {
ResolvedReflectiveBinding,
ResolvedReflectiveFactory,
- ReflectiveDependency,
-
ResolvedReflectiveProvider
} from './di/reflective_provider';
export {ReflectiveKey} from './di/reflective_key';
diff --git a/modules/@angular/core/src/di/decorators.dart b/modules/@angular/core/src/di/decorators.dart
index ab7cf001a3..261f4a86c6 100644
--- a/modules/@angular/core/src/di/decorators.dart
+++ b/modules/@angular/core/src/di/decorators.dart
@@ -5,6 +5,7 @@ export 'metadata.dart';
/**
* {@link InjectMetadata}.
+ * @stable
*/
class Inject extends InjectMetadata {
const Inject(dynamic token) : super(token);
@@ -12,6 +13,7 @@ class Inject extends InjectMetadata {
/**
* {@link OptionalMetadata}.
+ * @stable
*/
class Optional extends OptionalMetadata {
const Optional() : super();
@@ -19,6 +21,7 @@ class Optional extends OptionalMetadata {
/**
* {@link InjectableMetadata}.
+ * @stable
*/
class Injectable extends InjectableMetadata {
const Injectable() : super();
@@ -26,6 +29,7 @@ class Injectable extends InjectableMetadata {
/**
* {@link SelfMetadata}.
+ * @stable
*/
class Self extends SelfMetadata {
const Self() : super();
@@ -33,6 +37,7 @@ class Self extends SelfMetadata {
/**
* {@link HostMetadata}.
+ * @stable
*/
class Host extends HostMetadata {
const Host() : super();
@@ -40,6 +45,7 @@ class Host extends HostMetadata {
/**
* {@link SkipSelfMetadata}.
+ * @stable
*/
class SkipSelf extends SkipSelfMetadata {
const SkipSelf() : super();
diff --git a/modules/@angular/core/src/di/decorators.ts b/modules/@angular/core/src/di/decorators.ts
index 07bfd17031..262d7eebf4 100644
--- a/modules/@angular/core/src/di/decorators.ts
+++ b/modules/@angular/core/src/di/decorators.ts
@@ -10,6 +10,7 @@ import {makeDecorator, makeParamDecorator} from '../util/decorators';
/**
* Factory for creating {@link InjectMetadata}.
+ * @stable
*/
export interface InjectMetadataFactory {
(token: any): any;
@@ -18,6 +19,7 @@ export interface InjectMetadataFactory {
/**
* Factory for creating {@link OptionalMetadata}.
+ * @stable
*/
export interface OptionalMetadataFactory {
(): any;
@@ -26,6 +28,7 @@ export interface OptionalMetadataFactory {
/**
* Factory for creating {@link InjectableMetadata}.
+ * @stable
*/
export interface InjectableMetadataFactory {
(): any;
@@ -34,6 +37,7 @@ export interface InjectableMetadataFactory {
/**
* Factory for creating {@link SelfMetadata}.
+ * @stable
*/
export interface SelfMetadataFactory {
(): any;
@@ -42,6 +46,7 @@ export interface SelfMetadataFactory {
/**
* Factory for creating {@link HostMetadata}.
+ * @stable
*/
export interface HostMetadataFactory {
(): any;
@@ -50,6 +55,7 @@ export interface HostMetadataFactory {
/**
* Factory for creating {@link SkipSelfMetadata}.
+ * @stable
*/
export interface SkipSelfMetadataFactory {
(): any;
@@ -58,31 +64,37 @@ export interface SkipSelfMetadataFactory {
/**
* Factory for creating {@link InjectMetadata}.
+ * @stable
*/
export var Inject: InjectMetadataFactory = makeParamDecorator(InjectMetadata);
/**
* Factory for creating {@link OptionalMetadata}.
+ * @stable
*/
export var Optional: OptionalMetadataFactory = makeParamDecorator(OptionalMetadata);
/**
* Factory for creating {@link InjectableMetadata}.
+ * @stable
*/
export var Injectable: InjectableMetadataFactory =
makeDecorator(InjectableMetadata);
/**
* Factory for creating {@link SelfMetadata}.
+ * @stable
*/
export var Self: SelfMetadataFactory = makeParamDecorator(SelfMetadata);
/**
* Factory for creating {@link HostMetadata}.
+ * @stable
*/
export var Host: HostMetadataFactory = makeParamDecorator(HostMetadata);
/**
* Factory for creating {@link SkipSelfMetadata}.
+ * @stable
*/
export var SkipSelf: SkipSelfMetadataFactory = makeParamDecorator(SkipSelfMetadata);
diff --git a/modules/@angular/core/src/di/forward_ref.ts b/modules/@angular/core/src/di/forward_ref.ts
index 462807b3f7..83751003c6 100644
--- a/modules/@angular/core/src/di/forward_ref.ts
+++ b/modules/@angular/core/src/di/forward_ref.ts
@@ -19,6 +19,7 @@ export interface ForwardRefFn { (): any; }
*
* ### Example
* {@example core/di/ts/forward_ref/forward_ref.ts region='forward_ref'}
+ * @experimental
*/
export function forwardRef(forwardRefFn: ForwardRefFn): Type {
(forwardRefFn).__forward_ref__ = forwardRef;
@@ -40,6 +41,7 @@ export function forwardRef(forwardRefFn: ForwardRefFn): Type {
* ```
*
* See: {@link forwardRef}
+ * @experimental
*/
export function resolveForwardRef(type: any): any {
if (isFunction(type) && type.hasOwnProperty('__forward_ref__') &&
diff --git a/modules/@angular/core/src/di/injector.ts b/modules/@angular/core/src/di/injector.ts
index 4339ecf41d..b7b459733e 100644
--- a/modules/@angular/core/src/di/injector.ts
+++ b/modules/@angular/core/src/di/injector.ts
@@ -3,6 +3,9 @@ import {unimplemented} from '../../src/facade/exceptions';
const _THROW_IF_NOT_FOUND = /*@ts2dart_const*/ new Object();
export const THROW_IF_NOT_FOUND = /*@ts2dart_const*/ _THROW_IF_NOT_FOUND;
+/**
+ * @stable
+ */
export abstract class Injector {
static THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;
diff --git a/modules/@angular/core/src/di/metadata.ts b/modules/@angular/core/src/di/metadata.ts
index 6f834817a3..8b52152588 100644
--- a/modules/@angular/core/src/di/metadata.ts
+++ b/modules/@angular/core/src/di/metadata.ts
@@ -40,6 +40,7 @@ import {stringify} from '../../src/facade/lang';
* expect(injector.get(Car).engine instanceof Engine).toBe(true);
* ```
* @ts2dart_const
+ * @stable
*/
export class InjectMetadata {
constructor(public token) {}
@@ -67,6 +68,7 @@ export class InjectMetadata {
* expect(injector.get(Car).engine).toBeNull();
* ```
* @ts2dart_const
+ * @stable
*/
export class OptionalMetadata {
toString(): string { return `@Optional()`; }
@@ -76,6 +78,7 @@ export class OptionalMetadata {
* `DependencyMetadata` is used by the framework to extend DI.
* This is internal to Angular and should not be used directly.
* @ts2dart_const
+ * @stable
*/
export class DependencyMetadata {
get token() { return null; }
@@ -112,6 +115,7 @@ export class DependencyMetadata {
* expect(() => injector.get(NeedsService)).toThrowError();
* ```
* @ts2dart_const
+ * @stable
*/
export class InjectableMetadata {
constructor() {}
@@ -144,6 +148,7 @@ export class InjectableMetadata {
* expect(() => child.get(NeedsDependency)).toThrowError();
* ```
* @ts2dart_const
+ * @stable
*/
export class SelfMetadata {
toString(): string { return `@Self()`; }
@@ -174,6 +179,7 @@ export class SelfMetadata {
* expect(() => inj.get(NeedsDependency)).toThrowError();
* ```
* @ts2dart_const
+ * @stable
*/
export class SkipSelfMetadata {
toString(): string { return `@SkipSelf()`; }
@@ -233,6 +239,7 @@ export class SkipSelfMetadata {
* bootstrap(App);
*```
* @ts2dart_const
+ * @stable
*/
export class HostMetadata {
toString(): string { return `@Host()`; }
diff --git a/modules/@angular/core/src/di/opaque_token.ts b/modules/@angular/core/src/di/opaque_token.ts
index fddc0fa317..98e2dad0b4 100644
--- a/modules/@angular/core/src/di/opaque_token.ts
+++ b/modules/@angular/core/src/di/opaque_token.ts
@@ -19,6 +19,7 @@
* Using an `OpaqueToken` is preferable to using an `Object` as tokens because it provides better
* error messages.
* @ts2dart_const
+ * @stable
*/
export class OpaqueToken {
constructor(private _desc: string) {}
diff --git a/modules/@angular/core/src/di/provider.ts b/modules/@angular/core/src/di/provider.ts
index 9b69b704ee..a40e92d73b 100644
--- a/modules/@angular/core/src/di/provider.ts
+++ b/modules/@angular/core/src/di/provider.ts
@@ -16,6 +16,7 @@ import {BaseException} from '../../src/facade/exceptions';
* expect(injector.get("message")).toEqual('Hello');
* ```
* @ts2dart_const
+ * @deprecated
*/
export class Provider {
/**
@@ -259,6 +260,7 @@ export function bind(token): ProviderBuilder {
/**
* Helper class for the {@link bind} function.
+ * @deprecated
*/
export class ProviderBuilder {
constructor(public token) {}
@@ -384,6 +386,7 @@ export class ProviderBuilder {
* See {@link Provider} for more details.
*
*
+ * @deprecated
*/
export function provide(token, {useClass, useValue, useExisting, useFactory, deps, multi}: {
useClass?: Type,
diff --git a/modules/@angular/core/src/di/reflective_exceptions.ts b/modules/@angular/core/src/di/reflective_exceptions.ts
index 9915001c81..7c83763a3a 100644
--- a/modules/@angular/core/src/di/reflective_exceptions.ts
+++ b/modules/@angular/core/src/di/reflective_exceptions.ts
@@ -30,6 +30,7 @@ function constructResolvingPath(keys: any[]): string {
/**
* Base class for all errors arising from misconfigured providers.
+ * @stable
*/
export class AbstractProviderError extends BaseException {
/** @internal */
@@ -75,6 +76,7 @@ export class AbstractProviderError extends BaseException {
*
* expect(() => Injector.resolveAndCreate([A])).toThrowError();
* ```
+ * @stable
*/
export class NoProviderError extends AbstractProviderError {
constructor(injector: ReflectiveInjector, key: ReflectiveKey) {
@@ -100,6 +102,7 @@ export class NoProviderError extends AbstractProviderError {
* ```
*
* Retrieving `A` or `B` throws a `CyclicDependencyError` as the graph above cannot be constructed.
+ * @stable
*/
export class CyclicDependencyError extends AbstractProviderError {
constructor(injector: ReflectiveInjector, key: ReflectiveKey) {
@@ -134,6 +137,7 @@ export class CyclicDependencyError extends AbstractProviderError {
* expect(e.originalStack).toBeDefined();
* }
* ```
+ * @stable
*/
export class InstantiationError extends WrappedException {
/** @internal */
@@ -172,6 +176,7 @@ export class InstantiationError extends WrappedException {
* ```typescript
* expect(() => Injector.resolveAndCreate(["not a type"])).toThrowError();
* ```
+ * @stable
*/
export class InvalidProviderError extends BaseException {
constructor(provider) {
@@ -206,6 +211,7 @@ export class InvalidProviderError extends BaseException {
*
* expect(() => Injector.resolveAndCreate([A,B])).toThrowError();
* ```
+ * @stable
*/
export class NoAnnotationError extends BaseException {
constructor(typeOrFunc, params: any[][]) {
@@ -241,6 +247,7 @@ export class NoAnnotationError extends BaseException {
*
* expect(() => injector.getAt(100)).toThrowError();
* ```
+ * @stable
*/
export class OutOfBoundsError extends BaseException {
constructor(index) { super(`Index ${index} is out-of-bounds.`); }
diff --git a/modules/@angular/core/src/di/reflective_injector.ts b/modules/@angular/core/src/di/reflective_injector.ts
index 67e279867a..9619f21608 100644
--- a/modules/@angular/core/src/di/reflective_injector.ts
+++ b/modules/@angular/core/src/di/reflective_injector.ts
@@ -448,6 +448,7 @@ export abstract class ReflectiveInjector implements Injector {
* var injector = ReflectiveInjector.fromResolvedProviders(providers);
* expect(injector.get(Car) instanceof Car).toBe(true);
* ```
+ * @experimental
*/
static fromResolvedProviders(providers: ResolvedReflectiveProvider[],
parent: Injector = null): ReflectiveInjector {
diff --git a/modules/@angular/core/src/di/reflective_key.ts b/modules/@angular/core/src/di/reflective_key.ts
index 2855e84dd7..5923392612 100644
--- a/modules/@angular/core/src/di/reflective_key.ts
+++ b/modules/@angular/core/src/di/reflective_key.ts
@@ -16,6 +16,7 @@ import {resolveForwardRef} from './forward_ref';
* `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when
* resolving
* providers.
+ * @experimental
*/
export class ReflectiveKey {
/**
diff --git a/modules/@angular/core/src/di/reflective_provider.ts b/modules/@angular/core/src/di/reflective_provider.ts
index f08bfff10d..6a7054fcf4 100644
--- a/modules/@angular/core/src/di/reflective_provider.ts
+++ b/modules/@angular/core/src/di/reflective_provider.ts
@@ -88,6 +88,7 @@ export class ResolvedReflectiveProvider_ implements ResolvedReflectiveBinding {
/**
* An internal resolved representation of a factory function created by resolving {@link Provider}.
+ * @experimental
*/
export class ResolvedReflectiveFactory {
constructor(
diff --git a/modules/@angular/core/src/linker/component_factory.ts b/modules/@angular/core/src/linker/component_factory.ts
index 4743ce85f0..812007282c 100644
--- a/modules/@angular/core/src/linker/component_factory.ts
+++ b/modules/@angular/core/src/linker/component_factory.ts
@@ -13,6 +13,7 @@ import {Injector} from '../di/injector';
* `ComponentRef` provides access to the Component Instance as well other objects related to this
* Component Instance and allows you to destroy the Component Instance via the {@link #destroy}
* method.
+ * @stable
*/
export abstract class ComponentRef {
/**
@@ -69,9 +70,12 @@ export class ComponentRef_ extends ComponentRef {
onDestroy(callback: Function): void { this.hostView.onDestroy(callback); }
}
-const EMPTY_CONTEXT = /*@ts2dart_const*/ new Object();
-/*@ts2dart_const*/
+/**
+ * @experimental
+ * @ts2dart_const
+ */
+const EMPTY_CONTEXT = /*@ts2dart_const*/ new Object();
export class ComponentFactory {
constructor(public selector: string, private _viewFactory: Function,
private _componentType: Type) {}
diff --git a/modules/@angular/core/src/linker/component_resolver.ts b/modules/@angular/core/src/linker/component_resolver.ts
index 3a44b20a1c..84fa62674b 100644
--- a/modules/@angular/core/src/linker/component_resolver.ts
+++ b/modules/@angular/core/src/linker/component_resolver.ts
@@ -8,6 +8,7 @@ import {Injectable} from '../di/decorators';
/**
* Low-level service for loading {@link ComponentFactory}s, which
* can later be used to create and render a Component instance.
+ * @experimental
*/
export abstract class ComponentResolver {
abstract resolveComponent(component: Type|string): Promise>;
diff --git a/modules/@angular/core/src/linker/element_ref.ts b/modules/@angular/core/src/linker/element_ref.ts
index 5202c4f9dc..16468ba3f9 100644
--- a/modules/@angular/core/src/linker/element_ref.ts
+++ b/modules/@angular/core/src/linker/element_ref.ts
@@ -26,6 +26,7 @@ export class ElementRef {
* web worker.
*
*
+ * @stable
*/
public nativeElement: any;
diff --git a/modules/@angular/core/src/linker/exceptions.ts b/modules/@angular/core/src/linker/exceptions.ts
index 683ce4968d..5b49757e00 100644
--- a/modules/@angular/core/src/linker/exceptions.ts
+++ b/modules/@angular/core/src/linker/exceptions.ts
@@ -32,6 +32,7 @@ import {BaseException, WrappedException} from '../../src/facade/exceptions';
* }
* }
* ```
+ * @stable
*/
export class ExpressionChangedAfterItHasBeenCheckedException extends BaseException {
constructor(oldValue: any, currValue: any, context: any) {
@@ -45,6 +46,7 @@ export class ExpressionChangedAfterItHasBeenCheckedException extends BaseExcepti
*
* This error wraps the original exception to attach additional contextual information that can
* be useful for debugging.
+ * @stable
*/
export class ViewWrappedException extends WrappedException {
constructor(originalException: any, originalStack: any, context: any) {
@@ -58,6 +60,7 @@ export class ViewWrappedException extends WrappedException {
* This error indicates a bug in the framework.
*
* This is an internal Angular error.
+ * @stable
*/
export class ViewDestroyedException extends BaseException {
constructor(details: string) { super(`Attempt to use a destroyed view: ${details}`); }
diff --git a/modules/@angular/core/src/linker/query_list.ts b/modules/@angular/core/src/linker/query_list.ts
index ff2e286014..bc9c9f459d 100644
--- a/modules/@angular/core/src/linker/query_list.ts
+++ b/modules/@angular/core/src/linker/query_list.ts
@@ -26,6 +26,7 @@ import {Observable, EventEmitter} from '../../src/facade/async';
* }
* }
* ```
+ * @deprecated
*/
export class QueryList {
private _dirty = true;
diff --git a/modules/@angular/core/src/linker/systemjs_component_resolver.ts b/modules/@angular/core/src/linker/systemjs_component_resolver.ts
index 955d4f3b87..7e495cba0a 100644
--- a/modules/@angular/core/src/linker/systemjs_component_resolver.ts
+++ b/modules/@angular/core/src/linker/systemjs_component_resolver.ts
@@ -4,6 +4,7 @@ import { ComponentFactory } from './component_factory';
/**
* Component resolver that can load components lazily
+ * @experimental
*/
export class SystemJsComponentResolver implements ComponentResolver {
constructor(private _resolver: ComponentResolver) {}
diff --git a/modules/@angular/core/src/linker/template_ref.ts b/modules/@angular/core/src/linker/template_ref.ts
index 25e3e6ea06..2459fb5fa7 100644
--- a/modules/@angular/core/src/linker/template_ref.ts
+++ b/modules/@angular/core/src/linker/template_ref.ts
@@ -17,6 +17,7 @@ const EMPTY_CONTEXT = /*@ts2dart_const*/ new Object();
* To instantiate Embedded Views based on a Template, use
* {@link ViewContainerRef#createEmbeddedView}, which will create the View and attach it to the
* View Container.
+ * @stable
*/
export abstract class TemplateRef {
/**
diff --git a/modules/@angular/core/src/linker/view_container_ref.ts b/modules/@angular/core/src/linker/view_container_ref.ts
index e1eb77c14f..ebb3020b13 100644
--- a/modules/@angular/core/src/linker/view_container_ref.ts
+++ b/modules/@angular/core/src/linker/view_container_ref.ts
@@ -27,6 +27,7 @@ import {ComponentFactory, ComponentRef} from './component_factory';
*
* To access a `ViewContainerRef` of an Element, you can either place a {@link Directive} injected
* with `ViewContainerRef` on the Element, or you obtain it via a {@link ViewChild} query.
+ * @stable
*/
export abstract class ViewContainerRef {
/**
diff --git a/modules/@angular/core/src/linker/view_ref.ts b/modules/@angular/core/src/linker/view_ref.ts
index 16788d85d7..c2c1182c17 100644
--- a/modules/@angular/core/src/linker/view_ref.ts
+++ b/modules/@angular/core/src/linker/view_ref.ts
@@ -3,6 +3,9 @@ import {ChangeDetectorRef} from '../change_detection/change_detector_ref';
import {AppView} from './view';
import {ChangeDetectionStrategy} from '../change_detection/constants';
+/**
+ * @stable
+ */
export abstract class ViewRef {
get destroyed(): boolean { return unimplemented(); }
@@ -61,6 +64,7 @@ export abstract class ViewRef {
*
*
* ```
+ * @experimental
*/
export abstract class EmbeddedViewRef extends ViewRef {
get context(): C { return unimplemented(); }
diff --git a/modules/@angular/core/src/metadata.dart b/modules/@angular/core/src/metadata.dart
index dc9eb77ec9..78f4edbff4 100644
--- a/modules/@angular/core/src/metadata.dart
+++ b/modules/@angular/core/src/metadata.dart
@@ -22,6 +22,7 @@ export './metadata/lifecycle_hooks.dart' show
/**
* See: [DirectiveMetadata] for docs.
+ * @stable
*/
class Directive extends DirectiveMetadata {
const Directive(
@@ -50,6 +51,7 @@ class Directive extends DirectiveMetadata {
/**
* See: [ComponentMetadata] for docs.
+ * @stable
*/
class Component extends ComponentMetadata {
const Component(
@@ -100,6 +102,7 @@ class Component extends ComponentMetadata {
/**
* See: [ViewMetadata] for docs.
+ * @deprecated
*/
class View extends ViewMetadata {
const View(
@@ -124,6 +127,7 @@ class View extends ViewMetadata {
/**
* See: [PipeMetadata] for docs.
+ * @stable
*/
class Pipe extends PipeMetadata {
const Pipe({name, pure}) : super(name: name, pure: pure);
@@ -131,6 +135,7 @@ class Pipe extends PipeMetadata {
/**
* See: [AttributeMetadata] for docs.
+ * @stable
*/
class Attribute extends AttributeMetadata {
const Attribute(String attributeName) : super(attributeName);
@@ -138,8 +143,8 @@ class Attribute extends AttributeMetadata {
/**
* See: [QueryMetadata] for docs.
+ * @deprecated Use ContentChildren/ContentChild instead
*/
-@Deprecated("Use ContentChildren/ContentChild instead")
class Query extends QueryMetadata {
const Query(dynamic /*Type | string*/ selector,
{bool descendants: false, dynamic read: null})
@@ -148,6 +153,7 @@ class Query extends QueryMetadata {
/**
* See: [ContentChildrenMetadata] for docs.
+ * @stable
*/
class ContentChildren extends ContentChildrenMetadata {
const ContentChildren(dynamic /*Type | string*/ selector,
@@ -157,6 +163,7 @@ class ContentChildren extends ContentChildrenMetadata {
/**
* See: [ContentChildMetadata] for docs.
+ * @stable
*/
class ContentChild extends ContentChildMetadata {
const ContentChild(dynamic /*Type | string*/ selector, {dynamic read: null}) : super(selector, read: read);
@@ -164,8 +171,8 @@ class ContentChild extends ContentChildMetadata {
/**
* See: [ViewQueryMetadata] for docs.
+ * @deprecated Use ViewChildren/ViewChild instead
*/
-@Deprecated("Use ViewChildren/ViewChild instead")
class ViewQuery extends ViewQueryMetadata {
const ViewQuery(dynamic /*Type | string*/ selector, {dynamic read: null})
: super(selector, descendants: true, read: read);
@@ -173,6 +180,7 @@ class ViewQuery extends ViewQueryMetadata {
/**
* See: [ViewChildrenMetadata] for docs.
+ * @stable
*/
class ViewChildren extends ViewChildrenMetadata {
const ViewChildren(dynamic /*Type | string*/ selector, {dynamic read: null}) : super(selector, read: read);
@@ -180,6 +188,7 @@ class ViewChildren extends ViewChildrenMetadata {
/**
* See: [ViewChildMetadata] for docs.
+ * @stable
*/
class ViewChild extends ViewChildMetadata {
const ViewChild(dynamic /*Type | string*/ selector, {dynamic read: null}) : super(selector, read: read);
@@ -187,6 +196,7 @@ class ViewChild extends ViewChildMetadata {
/**
* See: [InputMetadata] for docs.
+ * @stable
*/
class Input extends InputMetadata {
const Input([String bindingPropertyName]) : super(bindingPropertyName);
@@ -194,6 +204,7 @@ class Input extends InputMetadata {
/**
* See: [OutputMetadata] for docs.
+ * @stable
*/
class Output extends OutputMetadata {
const Output([String bindingPropertyName]) : super(bindingPropertyName);
@@ -201,6 +212,7 @@ class Output extends OutputMetadata {
/**
* See: [HostBindingMetadata] for docs.
+ * @stable
*/
class HostBinding extends HostBindingMetadata {
const HostBinding([String hostPropertyName]) : super(hostPropertyName);
@@ -208,6 +220,7 @@ class HostBinding extends HostBindingMetadata {
/**
* See: [HostListenerMetadata] for docs.
+ * @stable
*/
class HostListener extends HostListenerMetadata {
const HostListener(String eventName, [List args])
diff --git a/modules/@angular/core/src/metadata.ts b/modules/@angular/core/src/metadata.ts
index b1606ed53f..7755040aa8 100644
--- a/modules/@angular/core/src/metadata.ts
+++ b/modules/@angular/core/src/metadata.ts
@@ -397,6 +397,7 @@ export interface AttributeMetadataFactory {
* [new ng.Query(SomeType)]
* ]
* ```
+ * @deprecated
*/
export interface QueryMetadataFactory {
(selector: Type | string,
@@ -407,6 +408,7 @@ export interface QueryMetadataFactory {
/**
* Factory for {@link ContentChildren}.
+ * @stable
*/
export interface ContentChildrenMetadataFactory {
(selector: Type | string, {descendants, read}?: {descendants?: boolean, read?: any}): any;
@@ -416,6 +418,7 @@ export interface ContentChildrenMetadataFactory {
/**
* Factory for {@link ContentChild}.
+ * @stable
*/
export interface ContentChildMetadataFactory {
(selector: Type | string, {read}?: {read?: any}): any;
@@ -424,6 +427,7 @@ export interface ContentChildMetadataFactory {
/**
* Factory for {@link ViewChildren}.
+ * @stable
*/
export interface ViewChildrenMetadataFactory {
(selector: Type | string, {read}?: {read?: any}): any;
@@ -432,6 +436,7 @@ export interface ViewChildrenMetadataFactory {
/**
* Factory for {@link ViewChild}.
+ * @stable
*/
export interface ViewChildMetadataFactory {
(selector: Type | string, {read}?: {read?: any}): any;
@@ -445,6 +450,7 @@ export interface ViewChildMetadataFactory {
* ### Example
*
* {@example core/ts/metadata/metadata.ts region='pipe'}
+ * @stable
*/
export interface PipeMetadataFactory {
(obj: {name: string, pure?: boolean}): any;
@@ -455,6 +461,7 @@ export interface PipeMetadataFactory {
* {@link InputMetadata} factory for creating decorators.
*
* See {@link InputMetadata}.
+ * @stable
*/
export interface InputMetadataFactory {
(bindingPropertyName?: string): any;
@@ -465,6 +472,7 @@ export interface InputMetadataFactory {
* {@link OutputMetadata} factory for creating decorators.
*
* See {@link OutputMetadata}.
+ * @stable
*/
export interface OutputMetadataFactory {
(bindingPropertyName?: string): any;
@@ -473,6 +481,7 @@ export interface OutputMetadataFactory {
/**
* {@link HostBindingMetadata} factory function.
+ * @stable
*/
export interface HostBindingMetadataFactory {
(hostPropertyName?: string): any;
@@ -481,6 +490,7 @@ export interface HostBindingMetadataFactory {
/**
* {@link HostListenerMetadata} factory function.
+ * @stable
*/
export interface HostListenerMetadataFactory {
(eventName: string, args?: string[]): any;
@@ -510,6 +520,7 @@ export interface HostListenerMetadataFactory {
* ### Example
*
* {@example core/ts/metadata/metadata.ts region='component'}
+ * @stable
*/
export var Component: ComponentMetadataFactory =
makeDecorator(ComponentMetadata, (fn: any) => fn.View = View);
@@ -892,6 +903,7 @@ export var Component: ComponentMetadataFactory =
* Note also that although the `` template still exists inside the ``,
* the instantiated
* view occurs on the second `` which is a sibling to the `` element.
+ * @stable
*/
export var Directive: DirectiveMetadataFactory =
makeDecorator(DirectiveMetadata);
@@ -925,6 +937,7 @@ export var Directive: DirectiveMetadataFactory =
* }
* }
* ```
+ * @deprecated
*/
var View: ViewMetadataFactory =
makeDecorator(ViewMetadata, (fn: any) => fn.View = View);
@@ -945,6 +958,7 @@ var View: ViewMetadataFactory =
* A decorator can inject string literal `text` like so:
*
* {@example core/ts/metadata/metadata.ts region='attributeMetadata'}
+ * @stable
*/
export var Attribute: AttributeMetadataFactory = makeParamDecorator(AttributeMetadata);
@@ -1055,6 +1069,7 @@ export var Attribute: AttributeMetadataFactory = makeParamDecorator(AttributeMet
*
* The injected object is an unmodifiable live list.
* See {@link QueryList} for more details.
+ * @deprecated
*/
export var Query: QueryMetadataFactory = makeParamDecorator(QueryMetadata);
@@ -1078,6 +1093,7 @@ export var Query: QueryMetadataFactory = makeParamDecorator(QueryMetadata);
* }
* }
* ```
+ * @stable
*/
export var ContentChildren: ContentChildrenMetadataFactory =
makePropDecorator(ContentChildrenMetadata);
@@ -1111,6 +1127,7 @@ export var ContentChildren: ContentChildrenMetadataFactory =
* - b
*
* ```
+ * @stable
*/
export var ContentChild: ContentChildMetadataFactory = makePropDecorator(ContentChildMetadata);
@@ -1193,6 +1210,7 @@ export var ContentChild: ContentChildMetadataFactory = makePropDecorator(Content
* ```
*
* See also: [ViewChildrenMetadata]
+ * @stable
*/
export var ViewChildren: ViewChildrenMetadataFactory = makePropDecorator(ViewChildrenMetadata);
@@ -1266,6 +1284,7 @@ export var ViewChildren: ViewChildrenMetadataFactory = makePropDecorator(ViewChi
* }
* ```
* See also: [ViewChildMetadata]
+ * @stable
*/
export var ViewChild: ViewChildMetadataFactory = makePropDecorator(ViewChildMetadata);
@@ -1304,6 +1323,7 @@ export var ViewChild: ViewChildMetadataFactory = makePropDecorator(ViewChildMeta
*
* The injected object is an iterable and observable live list.
* See {@link QueryList} for more details.
+ * @deprecated
*/
export var ViewQuery: QueryMetadataFactory = makeParamDecorator(ViewQueryMetadata);
@@ -1314,6 +1334,7 @@ export var ViewQuery: QueryMetadataFactory = makeParamDecorator(ViewQueryMetadat
* ### Example
*
* {@example core/ts/metadata/metadata.ts region='pipe'}
+ * @stable
*/
export var Pipe: PipeMetadataFactory = makeDecorator(PipeMetadata);
@@ -1358,6 +1379,7 @@ export var Pipe: PipeMetadataFactory = makeDecorator(PipeMe
*
* bootstrap(App);
* ```
+ * @stable
*/
export var Input: InputMetadataFactory = makePropDecorator(InputMetadata);
@@ -1402,6 +1424,7 @@ export var Input: InputMetadataFactory = makePropDecorator(InputMetadata);
* }
* bootstrap(App);
* ```
+ * @stable
*/
export var Output: OutputMetadataFactory = makePropDecorator(OutputMetadata);
@@ -1440,6 +1463,7 @@ export var Output: OutputMetadataFactory = makePropDecorator(OutputMetadata);
*
* bootstrap(App);
* ```
+ * @stable
*/
export var HostBinding: HostBindingMetadataFactory = makePropDecorator(HostBindingMetadata);
@@ -1477,5 +1501,6 @@ export var HostBinding: HostBindingMetadataFactory = makePropDecorator(HostBindi
*
* bootstrap(App);
* ```
+ * @stable
*/
export var HostListener: HostListenerMetadataFactory = makePropDecorator(HostListenerMetadata);
diff --git a/modules/@angular/core/src/metadata/di.ts b/modules/@angular/core/src/metadata/di.ts
index 67d7afb1e6..d22733e163 100644
--- a/modules/@angular/core/src/metadata/di.ts
+++ b/modules/@angular/core/src/metadata/di.ts
@@ -19,6 +19,7 @@ import {resolveForwardRef} from '../di/forward_ref';
*
* {@example core/ts/metadata/metadata.ts region='attributeMetadata'}
* @ts2dart_const
+ * @stable
*/
export class AttributeMetadata extends DependencyMetadata {
constructor(public attributeName: string) { super(); }
@@ -141,6 +142,7 @@ export class AttributeMetadata extends DependencyMetadata {
* The injected object is an unmodifiable live list.
* See {@link QueryList} for more details.
* @ts2dart_const
+ * @deprecated
*/
export class QueryMetadata extends DependencyMetadata {
/**
@@ -208,6 +210,7 @@ export class QueryMetadata extends DependencyMetadata {
* }
* ```
* @ts2dart_const
+ * @stable
*/
export class ContentChildrenMetadata extends QueryMetadata {
constructor(_selector: Type | string,
@@ -237,6 +240,7 @@ export class ContentChildrenMetadata extends QueryMetadata {
* }
* ```
* @ts2dart_const
+ * @stable
*/
export class ContentChildMetadata extends QueryMetadata {
constructor(_selector: Type | string, {read = null}: {read?: any} = {}) {
@@ -279,6 +283,7 @@ export class ContentChildMetadata extends QueryMetadata {
* The injected object is an iterable and observable live list.
* See {@link QueryList} for more details.
* @ts2dart_const
+ * @deprecated
*/
export class ViewQueryMetadata extends QueryMetadata {
constructor(_selector: Type | string,
@@ -371,6 +376,7 @@ export class ViewQueryMetadata extends QueryMetadata {
* }
* ```
* @ts2dart_const
+ * @stable
*/
export class ViewChildrenMetadata extends ViewQueryMetadata {
constructor(_selector: Type | string, {read = null}: {read?: any} = {}) {
@@ -448,6 +454,7 @@ export class ViewChildrenMetadata extends ViewQueryMetadata {
* }
* ```
* @ts2dart_const
+ * @stable
*/
export class ViewChildMetadata extends ViewQueryMetadata {
constructor(_selector: Type | string, {read = null}: {read?: any} = {}) {
diff --git a/modules/@angular/core/src/metadata/directives.ts b/modules/@angular/core/src/metadata/directives.ts
index 3d632440ff..11b4da5776 100644
--- a/modules/@angular/core/src/metadata/directives.ts
+++ b/modules/@angular/core/src/metadata/directives.ts
@@ -382,6 +382,7 @@ import {AnimationEntryMetadata} from '../animation/metadata';
* the instantiated
* view occurs on the second `` which is a sibling to the `` element.
* @ts2dart_const
+ * @stable
*/
export class DirectiveMetadata extends InjectableMetadata {
/**
@@ -789,6 +790,7 @@ export class DirectiveMetadata extends InjectableMetadata {
*
* {@example core/ts/metadata/metadata.ts region='component'}
* @ts2dart_const
+ * @stable
*/
export class ComponentMetadata extends DirectiveMetadata {
/**
@@ -943,6 +945,7 @@ export class ComponentMetadata extends DirectiveMetadata {
*
* {@example core/ts/metadata/metadata.ts region='pipe'}
* @ts2dart_const
+ * @stable
*/
export class PipeMetadata extends InjectableMetadata {
name: string;
@@ -999,6 +1002,7 @@ export class PipeMetadata extends InjectableMetadata {
* bootstrap(App);
* ```
* @ts2dart_const
+ * @stable
*/
export class InputMetadata {
constructor(
@@ -1049,6 +1053,7 @@ export class InputMetadata {
* bootstrap(App);
* ```
* @ts2dart_const
+ * @stable
*/
export class OutputMetadata {
constructor(public bindingPropertyName?: string) {}
@@ -1089,6 +1094,7 @@ export class OutputMetadata {
* bootstrap(App);
* ```
* @ts2dart_const
+ * @stable
*/
export class HostBindingMetadata {
constructor(public hostPropertyName?: string) {}
@@ -1128,6 +1134,7 @@ export class HostBindingMetadata {
* bootstrap(App);
* ```
* @ts2dart_const
+ * @stable
*/
export class HostListenerMetadata {
constructor(public eventName: string, public args?: string[]) {}
diff --git a/modules/@angular/core/src/metadata/lifecycle_hooks.ts b/modules/@angular/core/src/metadata/lifecycle_hooks.ts
index 2c54b4413b..89672128c5 100644
--- a/modules/@angular/core/src/metadata/lifecycle_hooks.ts
+++ b/modules/@angular/core/src/metadata/lifecycle_hooks.ts
@@ -1,5 +1,8 @@
import {SimpleChange} from '../change_detection/change_detection_util';
+/**
+ * @stable
+ */
export enum LifecycleHooks {
OnInit,
OnDestroy,
@@ -14,6 +17,7 @@ export enum LifecycleHooks {
/**
* A `changes` object whose keys are property names and
* values are instances of {@link SimpleChange}. See {@link OnChanges}
+ * @stable
*/
export interface SimpleChanges {[propName: string]: SimpleChange}
@@ -77,6 +81,7 @@ export var LIFECYCLE_HOOKS_VALUES = [
*
* bootstrap(App).catch(err => console.error(err));
* ```
+ * @stable
*/
export abstract class OnChanges { abstract ngOnChanges(changes: SimpleChanges); }
@@ -120,6 +125,7 @@ export abstract class OnChanges { abstract ngOnChanges(changes: SimpleChanges);
*
* bootstrap(App).catch(err => console.error(err));
* ```
+ * @stable
*/
export abstract class OnInit { abstract ngOnInit(); }
@@ -187,6 +193,7 @@ export abstract class OnInit { abstract ngOnInit(); }
* list = [];
* }
* ```
+ * @stable
*/
export abstract class DoCheck { abstract ngDoCheck(); }
@@ -278,6 +285,7 @@ export abstract class DoCheck { abstract ngDoCheck(); }
* Invoking `{{ 10000 | countdown }}` would cause the value to be decremented by 50,
* every 50ms, until it reaches 0.
*
+ * @stable
*/
export abstract class OnDestroy { abstract ngOnDestroy(); }
@@ -331,6 +339,7 @@ export abstract class OnDestroy { abstract ngOnDestroy(); }
*
* bootstrap(App).catch(err => console.error(err));
* ```
+ * @stable
*/
export abstract class AfterContentInit { abstract ngAfterContentInit(); }
@@ -379,6 +388,7 @@ export abstract class AfterContentInit { abstract ngAfterContentInit(); }
*
* bootstrap(App).catch(err => console.error(err));
* ```
+ * @stable
*/
export abstract class AfterContentChecked { abstract ngAfterContentChecked(); }
@@ -426,6 +436,7 @@ export abstract class AfterContentChecked { abstract ngAfterContentChecked(); }
*
* bootstrap(App).catch(err => console.error(err));
* ```
+ * @stable
*/
export abstract class AfterViewInit { abstract ngAfterViewInit(); }
@@ -476,5 +487,6 @@ export abstract class AfterViewInit { abstract ngAfterViewInit(); }
*
* bootstrap(App).catch(err => console.error(err));
* ```
+ * @stable
*/
export abstract class AfterViewChecked { abstract ngAfterViewChecked(); }
diff --git a/modules/@angular/core/src/metadata/view.ts b/modules/@angular/core/src/metadata/view.ts
index ae34a911de..5b0b9176d0 100644
--- a/modules/@angular/core/src/metadata/view.ts
+++ b/modules/@angular/core/src/metadata/view.ts
@@ -5,6 +5,7 @@ import {AnimationEntryMetadata} from '../animation/metadata';
* Defines template and style encapsulation options available for Component's {@link View}.
*
* See {@link ViewMetadata#encapsulation}.
+ * @stable
*/
export enum ViewEncapsulation {
/**
diff --git a/modules/@angular/core/src/platform_common_providers.ts b/modules/@angular/core/src/platform_common_providers.ts
index 3e10eda8d8..e833fbbe3f 100644
--- a/modules/@angular/core/src/platform_common_providers.ts
+++ b/modules/@angular/core/src/platform_common_providers.ts
@@ -14,6 +14,7 @@ var __unused: Type; // prevent missing use Dart warning.
/**
* A default set of providers which should be included in any Angular platform.
+ * @experimental
*/
export const PLATFORM_COMMON_PROVIDERS: Array = /*@ts2dart_const*/[
PLATFORM_CORE_PROVIDERS,
diff --git a/modules/@angular/core/src/platform_directives_and_pipes.ts b/modules/@angular/core/src/platform_directives_and_pipes.ts
index bf49d39875..e420273da3 100644
--- a/modules/@angular/core/src/platform_directives_and_pipes.ts
+++ b/modules/@angular/core/src/platform_directives_and_pipes.ts
@@ -23,6 +23,7 @@ import {OpaqueToken} from './di';
*
* bootstrap(MyComponent, [provide(PLATFORM_DIRECTIVES, {useValue: [OtherDirective], multi:true})]);
* ```
+ * @stable
*/
export const PLATFORM_DIRECTIVES: OpaqueToken =
/*@ts2dart_const*/ new OpaqueToken("Platform Directives");
@@ -49,5 +50,6 @@ export const PLATFORM_DIRECTIVES: OpaqueToken =
*
* bootstrap(MyComponent, [provide(PLATFORM_PIPES, {useValue: [OtherPipe], multi:true})]);
* ```
+ * @stable
*/
export const PLATFORM_PIPES: OpaqueToken = /*@ts2dart_const*/ new OpaqueToken("Platform Pipes");
diff --git a/modules/@angular/core/src/profile/profile.ts b/modules/@angular/core/src/profile/profile.ts
index 220a24c6db..a75e9cafa7 100644
--- a/modules/@angular/core/src/profile/profile.ts
+++ b/modules/@angular/core/src/profile/profile.ts
@@ -41,6 +41,7 @@ function noopScope(arg0?: any, arg1?: any): any {
* needs to be fixed before the app should be profiled. Add try-finally only when you expect that
* an exception is expected during normal execution while profiling.
*
+ * @experimental
*/
export var wtfCreateScope: (signature: string, flags?: any) => impl.WtfScopeFn =
wtfEnabled ? impl.createScope : (signature: string, flags?: any) => noopScope;
@@ -52,6 +53,7 @@ export var wtfCreateScope: (signature: string, flags?: any) => impl.WtfScopeFn =
* - `returnValue` (optional) to be passed to the WTF.
*
* Returns the `returnValue for easy chaining.
+ * @experimental
*/
export var wtfLeave:(scope: any, returnValue?: T) => T =
wtfEnabled ? impl.leave : (s: any, r?: any) => r;
@@ -67,6 +69,7 @@ export var wtfLeave:(scope: any, returnValue?: T) => T =
* wtfEndTimeRange(s);
* });
* }
+ * @experimental
*/
export var wtfStartTimeRange: (rangeType: string, action: string) => any =
wtfEnabled ? impl.startTimeRange : (rangeType: string, action: string) => null;
@@ -75,6 +78,7 @@ export var wtfStartTimeRange: (rangeType: string, action: string) => any =
* Ends a async time range operation.
* [range] is the return value from [wtfStartTimeRange] Async ranges only work if WTF has been
* enabled.
+ * @experimental
*/
export var wtfEndTimeRange: (range: any) => void = wtfEnabled ? impl.endTimeRange : (r: any) =>
null;
diff --git a/modules/@angular/core/src/render/api.ts b/modules/@angular/core/src/render/api.ts
index 3ec9972e4b..f52411ca87 100644
--- a/modules/@angular/core/src/render/api.ts
+++ b/modules/@angular/core/src/render/api.ts
@@ -5,6 +5,9 @@ import {AnimationKeyframe} from '../../src/animation/animation_keyframe';
import {AnimationPlayer} from '../../src/animation/animation_player';
import {AnimationStyles} from '../../src/animation/animation_styles';
+/**
+ * @experimental
+ */
export class RenderComponentType {
constructor(public id: string, public templateUrl: string, public slotCount: number,
public encapsulation: ViewEncapsulation, public styles: Array) {}
@@ -19,6 +22,9 @@ export abstract class RenderDebugInfo {
get source(): string { return unimplemented(); }
}
+/**
+ * @experimental
+ */
export abstract class Renderer {
abstract selectRootElement(selectorOrNode: string | any, debugInfo: RenderDebugInfo): any;
@@ -77,8 +83,8 @@ export abstract class Renderer {
* If you are implementing a custom renderer, you must implement this interface.
*
* The default Renderer implementation is `DomRenderer`. Also available is `WebWorkerRenderer`.
+ * @experimental
*/
-
export abstract class RootRenderer {
abstract renderComponent(componentType: RenderComponentType): Renderer;
}
diff --git a/modules/@angular/core/src/testability/testability.ts b/modules/@angular/core/src/testability/testability.ts
index 3c85877f30..64fa908a74 100644
--- a/modules/@angular/core/src/testability/testability.ts
+++ b/modules/@angular/core/src/testability/testability.ts
@@ -10,6 +10,7 @@ import {Injectable} from '../di/decorators';
* The Testability service provides testing hooks that can be accessed from
* the browser and by services such as Protractor. Each bootstrapped Angular
* application on the page will have an instance of Testability.
+ * @experimental
*/
@Injectable()
export class Testability {
@@ -101,6 +102,7 @@ export class Testability {
/**
* A global registry of {@link Testability} instances for specific elements.
+ * @experimental
*/
@Injectable()
export class TestabilityRegistry {
@@ -145,6 +147,7 @@ class _NoopGetTestability implements GetTestability {
/**
* Set the {@link GetTestability} implementation used by the Angular testing framework.
+ * @experimental
*/
export function setTestabilityGetter(getter: GetTestability): void {
_testabilityGetter = getter;
diff --git a/modules/@angular/core/src/util/decorators.ts b/modules/@angular/core/src/util/decorators.ts
index 9b1852c63b..76899049a5 100644
--- a/modules/@angular/core/src/util/decorators.ts
+++ b/modules/@angular/core/src/util/decorators.ts
@@ -206,6 +206,7 @@ function applyParams(fnOrArray: (Function | any[]), key: string): Function {
* }
* });
* ```
+ * @stable
*/
export function Class(clsDef: ClassDefinition): ConcreteType {
var constructor = applyParams(
diff --git a/modules/@angular/core/src/zone/ng_zone.ts b/modules/@angular/core/src/zone/ng_zone.ts
index 1e6e3223f9..0b583f8511 100644
--- a/modules/@angular/core/src/zone/ng_zone.ts
+++ b/modules/@angular/core/src/zone/ng_zone.ts
@@ -74,6 +74,7 @@ export {NgZoneError} from './ng_zone_impl';
* }
* }
* ```
+ * @experimental
*/
export class NgZone {
static isInAngularZone(): boolean { return NgZoneImpl.isInAngularZone(); }
diff --git a/modules/@angular/core/src/zone/ng_zone_impl.ts b/modules/@angular/core/src/zone/ng_zone_impl.ts
index f81855f8ae..0a4fc9cb2d 100644
--- a/modules/@angular/core/src/zone/ng_zone_impl.ts
+++ b/modules/@angular/core/src/zone/ng_zone_impl.ts
@@ -1,5 +1,6 @@
/**
* Stores error information; delivered via [NgZone.onError] stream.
+ * @deprecated
*/
export class NgZoneError {
constructor(public error: any, public stackTrace: any) {}
diff --git a/modules/@angular/facade/src/async.ts b/modules/@angular/facade/src/async.ts
index d9e7ebf9c6..6121565521 100644
--- a/modules/@angular/facade/src/async.ts
+++ b/modules/@angular/facade/src/async.ts
@@ -102,6 +102,7 @@ export class ObservableWrapper {
* https://github.com/jhusain/observable-spec
*
* Once a reference implementation of the spec is available, switch to it.
+ * @stable
*/
export class EventEmitter extends Subject {
// TODO: mark this as internal once all the facades are gone
diff --git a/modules/@angular/facade/src/exception_handler.ts b/modules/@angular/facade/src/exception_handler.ts
index 18139f84f1..06ba276e63 100644
--- a/modules/@angular/facade/src/exception_handler.ts
+++ b/modules/@angular/facade/src/exception_handler.ts
@@ -30,6 +30,7 @@ class _ArrayLogger {
* bootstrap(MyApp, [provide(ExceptionHandler, {useClass: MyExceptionHandler})])
*
* ```
+ * @stable
*/
export class ExceptionHandler {
constructor(private _logger: any, private _rethrowException: boolean = true) {}
diff --git a/modules/@angular/facade/src/exceptions.ts b/modules/@angular/facade/src/exceptions.ts
index dd1065a7be..e04dc91f3a 100644
--- a/modules/@angular/facade/src/exceptions.ts
+++ b/modules/@angular/facade/src/exceptions.ts
@@ -3,6 +3,9 @@ import {ExceptionHandler} from './exception_handler';
export {ExceptionHandler} from './exception_handler';
+/**
+ * @stable
+ */
export class BaseException extends Error {
public stack: any;
constructor(public message: string = "--") {
@@ -15,6 +18,7 @@ export class BaseException extends Error {
/**
* Wraps an exception and provides additional context or information.
+ * @stable
*/
export class WrappedException extends BaseWrappedException {
private _wrapperStack: any;
diff --git a/modules/@angular/facade/src/lang.js b/modules/@angular/facade/src/lang.js
deleted file mode 100644
index 89b5a9af82..0000000000
--- a/modules/@angular/facade/src/lang.js
+++ /dev/null
@@ -1,470 +0,0 @@
-"use strict";
-var __extends = (this && this.__extends) || function (d, b) {
- for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
- function __() { this.constructor = d; }
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
-};
-var globalScope;
-if (typeof window === 'undefined') {
- if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) {
- // TODO: Replace any with WorkerGlobalScope from lib.webworker.d.ts #3492
- globalScope = self;
- }
- else {
- globalScope = global;
- }
-}
-else {
- globalScope = window;
-}
-function scheduleMicroTask(fn) {
- Zone.current.scheduleMicroTask('scheduleMicrotask', fn);
-}
-exports.scheduleMicroTask = scheduleMicroTask;
-exports.IS_DART = false;
-// Need to declare a new variable for global here since TypeScript
-// exports the original value of the symbol.
-var _global = globalScope;
-exports.global = _global;
-exports.Type = Function;
-function getTypeNameForDebugging(type) {
- if (type['name']) {
- return type['name'];
- }
- return typeof type;
-}
-exports.getTypeNameForDebugging = getTypeNameForDebugging;
-exports.Math = _global.Math;
-exports.Date = _global.Date;
-var _devMode = true;
-var _modeLocked = false;
-function lockMode() {
- _modeLocked = true;
-}
-exports.lockMode = lockMode;
-/**
- * Disable Angular's development mode, which turns off assertions and other
- * checks within the framework.
- *
- * One important assertion this disables verifies that a change detection pass
- * does not result in additional changes to any bindings (also known as
- * unidirectional data flow).
- */
-function enableProdMode() {
- if (_modeLocked) {
- // Cannot use BaseException as that ends up importing from facade/lang.
- throw 'Cannot enable prod mode after platform setup.';
- }
- _devMode = false;
-}
-exports.enableProdMode = enableProdMode;
-function assertionsEnabled() {
- return _devMode;
-}
-exports.assertionsEnabled = assertionsEnabled;
-// TODO: remove calls to assert in production environment
-// Note: Can't just export this and import in in other files
-// as `assert` is a reserved keyword in Dart
-_global.assert = function assert(condition) {
- // TODO: to be fixed properly via #2830, noop for now
-};
-function isPresent(obj) {
- return obj !== undefined && obj !== null;
-}
-exports.isPresent = isPresent;
-function isBlank(obj) {
- return obj === undefined || obj === null;
-}
-exports.isBlank = isBlank;
-function isBoolean(obj) {
- return typeof obj === "boolean";
-}
-exports.isBoolean = isBoolean;
-function isNumber(obj) {
- return typeof obj === "number";
-}
-exports.isNumber = isNumber;
-function isString(obj) {
- return typeof obj === "string";
-}
-exports.isString = isString;
-function isFunction(obj) {
- return typeof obj === "function";
-}
-exports.isFunction = isFunction;
-function isType(obj) {
- return isFunction(obj);
-}
-exports.isType = isType;
-function isStringMap(obj) {
- return typeof obj === 'object' && obj !== null;
-}
-exports.isStringMap = isStringMap;
-function isPromise(obj) {
- return obj instanceof _global.Promise;
-}
-exports.isPromise = isPromise;
-function isArray(obj) {
- return Array.isArray(obj);
-}
-exports.isArray = isArray;
-function isDate(obj) {
- return obj instanceof exports.Date && !isNaN(obj.valueOf());
-}
-exports.isDate = isDate;
-function noop() { }
-exports.noop = noop;
-function stringify(token) {
- if (typeof token === 'string') {
- return token;
- }
- if (token === undefined || token === null) {
- return '' + token;
- }
- if (token.name) {
- return token.name;
- }
- if (token.overriddenName) {
- return token.overriddenName;
- }
- var res = token.toString();
- var newLineIndex = res.indexOf("\n");
- return (newLineIndex === -1) ? res : res.substring(0, newLineIndex);
-}
-exports.stringify = stringify;
-// serialize / deserialize enum exist only for consistency with dart API
-// enums in typescript don't need to be serialized
-function serializeEnum(val) {
- return val;
-}
-exports.serializeEnum = serializeEnum;
-function deserializeEnum(val, values) {
- return val;
-}
-exports.deserializeEnum = deserializeEnum;
-function resolveEnumToken(enumValue, val) {
- return enumValue[val];
-}
-exports.resolveEnumToken = resolveEnumToken;
-var StringWrapper = (function () {
- function StringWrapper() {
- }
- StringWrapper.fromCharCode = function (code) { return String.fromCharCode(code); };
- StringWrapper.charCodeAt = function (s, index) { return s.charCodeAt(index); };
- StringWrapper.split = function (s, regExp) { return s.split(regExp); };
- StringWrapper.equals = function (s, s2) { return s === s2; };
- StringWrapper.stripLeft = function (s, charVal) {
- if (s && s.length) {
- var pos = 0;
- for (var i = 0; i < s.length; i++) {
- if (s[i] != charVal)
- break;
- pos++;
- }
- s = s.substring(pos);
- }
- return s;
- };
- StringWrapper.stripRight = function (s, charVal) {
- if (s && s.length) {
- var pos = s.length;
- for (var i = s.length - 1; i >= 0; i--) {
- if (s[i] != charVal)
- break;
- pos--;
- }
- s = s.substring(0, pos);
- }
- return s;
- };
- StringWrapper.replace = function (s, from, replace) {
- return s.replace(from, replace);
- };
- StringWrapper.replaceAll = function (s, from, replace) {
- return s.replace(from, replace);
- };
- StringWrapper.slice = function (s, from, to) {
- if (from === void 0) { from = 0; }
- if (to === void 0) { to = null; }
- return s.slice(from, to === null ? undefined : to);
- };
- StringWrapper.replaceAllMapped = function (s, from, cb) {
- return s.replace(from, function () {
- var matches = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- matches[_i - 0] = arguments[_i];
- }
- // Remove offset & string from the result array
- matches.splice(-2, 2);
- // The callback receives match, p1, ..., pn
- return cb(matches);
- });
- };
- StringWrapper.contains = function (s, substr) { return s.indexOf(substr) != -1; };
- StringWrapper.compare = function (a, b) {
- if (a < b) {
- return -1;
- }
- else if (a > b) {
- return 1;
- }
- else {
- return 0;
- }
- };
- return StringWrapper;
-}());
-exports.StringWrapper = StringWrapper;
-var StringJoiner = (function () {
- function StringJoiner(parts) {
- if (parts === void 0) { parts = []; }
- this.parts = parts;
- }
- StringJoiner.prototype.add = function (part) { this.parts.push(part); };
- StringJoiner.prototype.toString = function () { return this.parts.join(""); };
- return StringJoiner;
-}());
-exports.StringJoiner = StringJoiner;
-var NumberParseError = (function (_super) {
- __extends(NumberParseError, _super);
- function NumberParseError(message) {
- _super.call(this);
- this.message = message;
- }
- NumberParseError.prototype.toString = function () { return this.message; };
- return NumberParseError;
-}(Error));
-exports.NumberParseError = NumberParseError;
-var NumberWrapper = (function () {
- function NumberWrapper() {
- }
- NumberWrapper.toFixed = function (n, fractionDigits) { return n.toFixed(fractionDigits); };
- NumberWrapper.equal = function (a, b) { return a === b; };
- NumberWrapper.parseIntAutoRadix = function (text) {
- var result = parseInt(text);
- if (isNaN(result)) {
- throw new NumberParseError("Invalid integer literal when parsing " + text);
- }
- return result;
- };
- NumberWrapper.parseInt = function (text, radix) {
- if (radix == 10) {
- if (/^(\-|\+)?[0-9]+$/.test(text)) {
- return parseInt(text, radix);
- }
- }
- else if (radix == 16) {
- if (/^(\-|\+)?[0-9ABCDEFabcdef]+$/.test(text)) {
- return parseInt(text, radix);
- }
- }
- else {
- var result = parseInt(text, radix);
- if (!isNaN(result)) {
- return result;
- }
- }
- throw new NumberParseError("Invalid integer literal when parsing " + text + " in base " +
- radix);
- };
- // TODO: NaN is a valid literal but is returned by parseFloat to indicate an error.
- NumberWrapper.parseFloat = function (text) { return parseFloat(text); };
- Object.defineProperty(NumberWrapper, "NaN", {
- get: function () { return NaN; },
- enumerable: true,
- configurable: true
- });
- NumberWrapper.isNaN = function (value) { return isNaN(value); };
- NumberWrapper.isInteger = function (value) { return Number.isInteger(value); };
- return NumberWrapper;
-}());
-exports.NumberWrapper = NumberWrapper;
-exports.RegExp = _global.RegExp;
-var RegExpWrapper = (function () {
- function RegExpWrapper() {
- }
- RegExpWrapper.create = function (regExpStr, flags) {
- if (flags === void 0) { flags = ''; }
- flags = flags.replace(/g/g, '');
- return new _global.RegExp(regExpStr, flags + 'g');
- };
- RegExpWrapper.firstMatch = function (regExp, input) {
- // Reset multimatch regex state
- regExp.lastIndex = 0;
- return regExp.exec(input);
- };
- RegExpWrapper.test = function (regExp, input) {
- regExp.lastIndex = 0;
- return regExp.test(input);
- };
- RegExpWrapper.matcher = function (regExp, input) {
- // Reset regex state for the case
- // someone did not loop over all matches
- // last time.
- regExp.lastIndex = 0;
- return { re: regExp, input: input };
- };
- RegExpWrapper.replaceAll = function (regExp, input, replace) {
- var c = regExp.exec(input);
- var res = '';
- regExp.lastIndex = 0;
- var prev = 0;
- while (c) {
- res += input.substring(prev, c.index);
- res += replace(c);
- prev = c.index + c[0].length;
- regExp.lastIndex = prev;
- c = regExp.exec(input);
- }
- res += input.substring(prev);
- return res;
- };
- return RegExpWrapper;
-}());
-exports.RegExpWrapper = RegExpWrapper;
-var RegExpMatcherWrapper = (function () {
- function RegExpMatcherWrapper() {
- }
- RegExpMatcherWrapper.next = function (matcher) {
- return matcher.re.exec(matcher.input);
- };
- return RegExpMatcherWrapper;
-}());
-exports.RegExpMatcherWrapper = RegExpMatcherWrapper;
-var FunctionWrapper = (function () {
- function FunctionWrapper() {
- }
- FunctionWrapper.apply = function (fn, posArgs) { return fn.apply(null, posArgs); };
- return FunctionWrapper;
-}());
-exports.FunctionWrapper = FunctionWrapper;
-// JS has NaN !== NaN
-function looseIdentical(a, b) {
- return a === b || typeof a === "number" && typeof b === "number" && isNaN(a) && isNaN(b);
-}
-exports.looseIdentical = looseIdentical;
-// JS considers NaN is the same as NaN for map Key (while NaN !== NaN otherwise)
-// see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map
-function getMapKey(value) {
- return value;
-}
-exports.getMapKey = getMapKey;
-function normalizeBlank(obj) {
- return isBlank(obj) ? null : obj;
-}
-exports.normalizeBlank = normalizeBlank;
-function normalizeBool(obj) {
- return isBlank(obj) ? false : obj;
-}
-exports.normalizeBool = normalizeBool;
-function isJsObject(o) {
- return o !== null && (typeof o === "function" || typeof o === "object");
-}
-exports.isJsObject = isJsObject;
-function print(obj) {
- console.log(obj);
-}
-exports.print = print;
-// Can't be all uppercase as our transpiler would think it is a special directive...
-var Json = (function () {
- function Json() {
- }
- Json.parse = function (s) { return _global.JSON.parse(s); };
- Json.stringify = function (data) {
- // Dart doesn't take 3 arguments
- return _global.JSON.stringify(data, null, 2);
- };
- return Json;
-}());
-exports.Json = Json;
-var DateWrapper = (function () {
- function DateWrapper() {
- }
- DateWrapper.create = function (year, month, day, hour, minutes, seconds, milliseconds) {
- if (month === void 0) { month = 1; }
- if (day === void 0) { day = 1; }
- if (hour === void 0) { hour = 0; }
- if (minutes === void 0) { minutes = 0; }
- if (seconds === void 0) { seconds = 0; }
- if (milliseconds === void 0) { milliseconds = 0; }
- return new exports.Date(year, month - 1, day, hour, minutes, seconds, milliseconds);
- };
- DateWrapper.fromISOString = function (str) { return new exports.Date(str); };
- DateWrapper.fromMillis = function (ms) { return new exports.Date(ms); };
- DateWrapper.toMillis = function (date) { return date.getTime(); };
- DateWrapper.now = function () { return new exports.Date(); };
- DateWrapper.toJson = function (date) { return date.toJSON(); };
- return DateWrapper;
-}());
-exports.DateWrapper = DateWrapper;
-function setValueOnPath(global, path, value) {
- var parts = path.split('.');
- var obj = global;
- while (parts.length > 1) {
- var name = parts.shift();
- if (obj.hasOwnProperty(name) && isPresent(obj[name])) {
- obj = obj[name];
- }
- else {
- obj = obj[name] = {};
- }
- }
- if (obj === undefined || obj === null) {
- obj = {};
- }
- obj[parts.shift()] = value;
-}
-exports.setValueOnPath = setValueOnPath;
-var _symbolIterator = null;
-function getSymbolIterator() {
- if (isBlank(_symbolIterator)) {
- if (isPresent(Symbol) && isPresent(Symbol.iterator)) {
- _symbolIterator = Symbol.iterator;
- }
- else {
- // es6-shim specific logic
- var keys = Object.getOwnPropertyNames(Map.prototype);
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- if (key !== 'entries' && key !== 'size' &&
- Map.prototype[key] === Map.prototype['entries']) {
- _symbolIterator = key;
- }
- }
- }
- }
- return _symbolIterator;
-}
-exports.getSymbolIterator = getSymbolIterator;
-function evalExpression(sourceUrl, expr, declarations, vars) {
- var fnBody = declarations + "\nreturn " + expr + "\n//# sourceURL=" + sourceUrl;
- var fnArgNames = [];
- var fnArgValues = [];
- for (var argName in vars) {
- fnArgNames.push(argName);
- fnArgValues.push(vars[argName]);
- }
- return new (Function.bind.apply(Function, [void 0].concat(fnArgNames.concat(fnBody))))().apply(void 0, fnArgValues);
-}
-exports.evalExpression = evalExpression;
-function isPrimitive(obj) {
- return !isJsObject(obj);
-}
-exports.isPrimitive = isPrimitive;
-function hasConstructor(value, type) {
- return value.constructor === type;
-}
-exports.hasConstructor = hasConstructor;
-function bitWiseOr(values) {
- return values.reduce(function (a, b) { return a | b; });
-}
-exports.bitWiseOr = bitWiseOr;
-function bitWiseAnd(values) {
- return values.reduce(function (a, b) { return a & b; });
-}
-exports.bitWiseAnd = bitWiseAnd;
-function escape(s) {
- return _global.encodeURI(s);
-}
-exports.escape = escape;
-//# sourceMappingURL=lang.js.map
\ No newline at end of file
diff --git a/modules/@angular/facade/src/lang.ts b/modules/@angular/facade/src/lang.ts
index a938f43f20..35c50515a9 100644
--- a/modules/@angular/facade/src/lang.ts
+++ b/modules/@angular/facade/src/lang.ts
@@ -91,6 +91,7 @@ export function lockMode() {
* One important assertion this disables verifies that a change detection pass
* does not result in additional changes to any bindings (also known as
* unidirectional data flow).
+ * @stable
*/
export function enableProdMode() {
if (_modeLocked) {
diff --git a/modules/@angular/integration_test/public_api_spec.ts b/modules/@angular/integration_test/public_api_spec.ts
index a7032aa007..350a3b74c4 100644
--- a/modules/@angular/integration_test/public_api_spec.ts
+++ b/modules/@angular/integration_test/public_api_spec.ts
@@ -165,6 +165,7 @@ var COMPILER_TESTING: string[] = [
'TestComponentRenderer'
];
+// API Classification audited
var CORE: string[] = [
'__core_private__',
'BaseException',
@@ -176,7 +177,6 @@ var CORE: string[] = [
'wtfStartTimeRange',
'APP_INITIALIZER',
'APP_ID',
- 'AngularEntrypoint:dart',
'AbstractProviderError',
'AUTO_STYLE',
'AnimationAnimateMetadata',
@@ -210,7 +210,7 @@ var CORE: string[] = [
"CollectionChangeRecord",
'ChangeDetectionStrategy',
'ChangeDetectorRef',
- 'Class:js',
+ 'Class',
'ComponentResolver',
'SystemJsComponentResolver',
'Component',
@@ -224,8 +224,6 @@ var CORE: string[] = [
'PLATFORM_PIPES',
'DebugNode',
'DebugElement',
- 'ReflectiveDependency',
- 'DependencyMetadata',
'Directive',
'DirectiveMetadata',
'DynamicComponentLoader',
@@ -275,8 +273,6 @@ var CORE: string[] = [
'Renderer',
'RootRenderer',
'RenderComponentType',
- 'ResolvedReflectiveBinding:dart',
- 'ResolvedReflectiveProvider:dart',
'ResolvedReflectiveFactory',
'Self',
'SelfMetadata',
@@ -286,20 +282,9 @@ var CORE: string[] = [
'TemplateRef',
'Testability',
'TestabilityRegistry',
- 'GetTestability:dart',
'setTestabilityGetter',
'Type',
'PACKAGE_ROOT_URL',
- 'View:dart',
- /*
- 'View.directives:dart',
- 'View.encapsulation:dart',
- 'View.pipes:dart',
- 'View.styleUrls:dart',
- 'View.styles:dart',
- 'View.template:dart',
- 'View.templateUrl:dart',
- */
'ViewChild',
'ViewChildMetadata',
'ViewChildren',
@@ -315,14 +300,14 @@ var CORE: string[] = [
'bind',
'provide',
'createNgZone',
- 'forwardRef:js',
+ 'forwardRef',
'coreBootstrap',
'coreLoadAndBootstrap',
'createPlatform',
'disposePlatform',
'getPlatform',
'assertPlatform',
- 'resolveForwardRef:js',
+ 'resolveForwardRef',
'PLATFORM_COMMON_PROVIDERS',
'PLATFORM_INITIALIZER',
'AfterContentChecked',
@@ -330,25 +315,10 @@ var CORE: string[] = [
'AfterViewChecked',
'AfterViewInit',
'DoCheck',
- 'IterableDifferFactory:dart',
- 'IterableDiffer:dart',
- 'KeyValueDifferFactory:dart',
- 'KeyValueDiffer:dart',
'OnChanges',
'OnDestroy',
'OnInit',
- 'PipeTransform:dart',
- 'reflector',
- 'Stream:dart',
- 'GetterFn:dart',
- 'MethodFn:dart',
- 'NoReflectionCapabilities:dart',
- 'PlatformReflectionCapabilities:dart',
- 'ReflectionInfo',
- 'Reflector',
- 'SetterFn:dart',
'ViewRef',
- 'TrackByFn:dart'
];
var CORE_TESTING: string[] = [
diff --git a/modules/@angular/platform-browser/core_private.ts b/modules/@angular/platform-browser/core_private.ts
index 67cb31a03e..9c6e8db754 100644
--- a/modules/@angular/platform-browser/core_private.ts
+++ b/modules/@angular/platform-browser/core_private.ts
@@ -12,6 +12,7 @@ export var SecurityContext: typeof t.SecurityContext = r.SecurityContext;
export type SecurityContext = t.SecurityContext;
export var SanitizationService: typeof t.SanitizationService = r.SanitizationService;
export type SanitizationService = t.SanitizationService;
+export var reflector: typeof t.reflector = r.reflector;
export type NoOpAnimationPlayer = t.NoOpAnimationPlayer;
export var NoOpAnimationPlayer: typeof t.NoOpAnimationPlayer = r.NoOpAnimationPlayer;
diff --git a/modules/@angular/router-deprecated/core_private.ts b/modules/@angular/router-deprecated/core_private.ts
index 701bf7f510..f05714f384 100644
--- a/modules/@angular/router-deprecated/core_private.ts
+++ b/modules/@angular/router-deprecated/core_private.ts
@@ -1,3 +1,4 @@
-import {__core_private__} from '@angular/core';
+import {__core_private__ as _} from '@angular/core';
-export var makeDecorator: typeof __core_private__.makeDecorator = __core_private__.makeDecorator;
+export var makeDecorator: typeof _.makeDecorator = _.makeDecorator;
+export var reflector: typeof _.reflector = _.reflector;
diff --git a/modules/@angular/router-deprecated/src/lifecycle/route_lifecycle_reflector.ts b/modules/@angular/router-deprecated/src/lifecycle/route_lifecycle_reflector.ts
index c5143b4711..4f145d3ac5 100644
--- a/modules/@angular/router-deprecated/src/lifecycle/route_lifecycle_reflector.ts
+++ b/modules/@angular/router-deprecated/src/lifecycle/route_lifecycle_reflector.ts
@@ -1,6 +1,6 @@
import {Type} from '@angular/core';
import {RouteLifecycleHook, CanActivate} from './lifecycle_annotations_impl';
-import {reflector} from '@angular/core';
+import {reflector} from '../../core_private';
export function hasLifecycleHook(e: RouteLifecycleHook, type): boolean {
if (!(type instanceof Type)) return false;
diff --git a/modules/@angular/router-deprecated/src/route_registry.ts b/modules/@angular/router-deprecated/src/route_registry.ts
index 62a863ad4f..496856879b 100644
--- a/modules/@angular/router-deprecated/src/route_registry.ts
+++ b/modules/@angular/router-deprecated/src/route_registry.ts
@@ -13,7 +13,7 @@ import {
getTypeNameForDebugging,
} from '../src/facade/lang';
import {BaseException} from '../src/facade/exceptions';
-import {Injectable, Inject, OpaqueToken, reflector} from '@angular/core';
+import {Injectable, Inject, OpaqueToken} from '@angular/core';
import {RouteConfig, Route, AuxRoute, RouteDefinition} from './route_config/route_config_impl';
import {PathMatch, RedirectMatch, RouteMatch} from './rules/rules';
import {RuleSet} from './rules/rule_set';
@@ -27,6 +27,7 @@ import {
import {normalizeRouteConfig, assertComponentExists} from './route_config/route_config_normalizer';
import {parser, Url, convertUrlParamsToArray} from './url_parser';
import {GeneratedUrl} from './rules/route_paths/route_path';
+import {reflector} from '../core_private';
var _resolveToNull = PromiseWrapper.resolve(null);
diff --git a/modules/@angular/router/src/core_private.ts b/modules/@angular/router/src/core_private.ts
index 701bf7f510..f05714f384 100644
--- a/modules/@angular/router/src/core_private.ts
+++ b/modules/@angular/router/src/core_private.ts
@@ -1,3 +1,4 @@
-import {__core_private__} from '@angular/core';
+import {__core_private__ as _} from '@angular/core';
-export var makeDecorator: typeof __core_private__.makeDecorator = __core_private__.makeDecorator;
+export var makeDecorator: typeof _.makeDecorator = _.makeDecorator;
+export var reflector: typeof _.reflector = _.reflector;
diff --git a/modules/@angular/router/src/directives/router_link.ts b/modules/@angular/router/src/directives/router_link.ts
index 13b7fe3193..b7a75df9cf 100644
--- a/modules/@angular/router/src/directives/router_link.ts
+++ b/modules/@angular/router/src/directives/router_link.ts
@@ -1,21 +1,6 @@
-import {
- ResolvedReflectiveProvider,
- Directive,
- DynamicComponentLoader,
- ViewContainerRef,
- Attribute,
- ComponentRef,
- ComponentFactory,
- ReflectiveInjector,
- OnInit,
- HostListener,
- HostBinding,
- Input,
- OnDestroy,
- Optional
-} from '@angular/core';
-import {RouterOutletMap, Router} from '../router';
-import {RouteSegment, UrlSegment, Tree} from '../segments';
+import {Directive, HostListener, HostBinding, Input, OnDestroy} from '@angular/core';
+import {Router} from '../router';
+import {RouteSegment} from '../segments';
import {isString, isArray, isPresent} from '../facade/lang';
import {ObservableWrapper} from '../facade/async';
diff --git a/modules/@angular/router/src/directives/router_outlet.ts b/modules/@angular/router/src/directives/router_outlet.ts
index 38d7769b77..05c6376686 100644
--- a/modules/@angular/router/src/directives/router_outlet.ts
+++ b/modules/@angular/router/src/directives/router_outlet.ts
@@ -1,13 +1,11 @@
import {
ResolvedReflectiveProvider,
Directive,
- DynamicComponentLoader,
ViewContainerRef,
Attribute,
ComponentRef,
ComponentFactory,
- ReflectiveInjector,
- OnInit
+ ReflectiveInjector
} from '@angular/core';
import {RouterOutletMap} from '../router';
import {DEFAULT_OUTLET_NAME} from '../constants';
diff --git a/modules/@angular/router/src/recognize.ts b/modules/@angular/router/src/recognize.ts
index e2b1992c69..a9586280b6 100644
--- a/modules/@angular/router/src/recognize.ts
+++ b/modules/@angular/router/src/recognize.ts
@@ -15,7 +15,7 @@ import {PromiseWrapper} from './facade/promise';
import {BaseException, ComponentFactory} from '@angular/core';
import {ComponentResolver} from '@angular/core';
import {DEFAULT_OUTLET_NAME} from './constants';
-import {reflector} from '@angular/core';
+import {reflector} from './core_private';
export function recognize(componentResolver: ComponentResolver, rootComponent: Type, url: UrlTree,
existingTree: RouteTree): Promise {