2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2017-02-23 21:04:51 -05:00
|
|
|
export interface AfterContentChecked {
|
|
|
|
ngAfterContentChecked(): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2017-02-23 21:04:51 -05:00
|
|
|
export interface AfterContentInit {
|
|
|
|
ngAfterContentInit(): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2017-02-23 21:04:51 -05:00
|
|
|
export interface AfterViewChecked {
|
|
|
|
ngAfterViewChecked(): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2017-02-23 21:04:51 -05:00
|
|
|
export interface AfterViewInit {
|
|
|
|
ngAfterViewInit(): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-07-07 13:05:55 -04:00
|
|
|
/** @experimental */
|
2017-01-03 19:54:46 -05:00
|
|
|
export declare const ANALYZE_FOR_ENTRY_COMPONENTS: InjectionToken<any>;
|
2016-07-07 13:05:55 -04:00
|
|
|
|
2017-02-21 12:48:09 -05:00
|
|
|
/** @deprecated */
|
|
|
|
export declare function animate(timings: string | number, styles?: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata): AnimationAnimateMetadata;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2017-02-21 12:48:09 -05:00
|
|
|
/** @deprecated */
|
|
|
|
export interface AnimationAnimateMetadata extends AnimationMetadata {
|
2017-03-29 12:34:45 -04:00
|
|
|
styles: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata | null;
|
2017-02-21 12:48:09 -05:00
|
|
|
timings: string | number | AnimateTimings;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2017-02-21 12:48:09 -05:00
|
|
|
/** @deprecated */
|
|
|
|
export declare type AnimationEntryMetadata = any;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2017-02-21 12:48:09 -05:00
|
|
|
/** @deprecated */
|
|
|
|
export interface AnimationGroupMetadata extends AnimationMetadata {
|
|
|
|
steps: AnimationMetadata[];
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2017-02-28 02:08:19 -05:00
|
|
|
/** @deprecated */
|
|
|
|
export declare type AnimationKeyframe = any;
|
2017-01-24 13:22:47 -05:00
|
|
|
|
2017-02-21 12:48:09 -05:00
|
|
|
/** @deprecated */
|
|
|
|
export interface AnimationKeyframesSequenceMetadata extends AnimationMetadata {
|
2016-06-22 17:56:10 -04:00
|
|
|
steps: AnimationStyleMetadata[];
|
|
|
|
}
|
|
|
|
|
2017-02-21 12:48:09 -05:00
|
|
|
/** @deprecated */
|
|
|
|
export interface AnimationMetadata {
|
|
|
|
type: AnimationMetadataType;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2017-02-28 02:08:19 -05:00
|
|
|
/** @deprecated */
|
|
|
|
export declare type AnimationPlayer = any;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2017-02-21 12:48:09 -05:00
|
|
|
/** @deprecated */
|
|
|
|
export interface AnimationSequenceMetadata extends AnimationMetadata {
|
|
|
|
steps: AnimationMetadata[];
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2017-02-21 12:48:09 -05:00
|
|
|
/** @deprecated */
|
|
|
|
export interface AnimationStateMetadata extends AnimationMetadata {
|
|
|
|
name: string;
|
2016-06-22 17:56:10 -04:00
|
|
|
styles: AnimationStyleMetadata;
|
|
|
|
}
|
|
|
|
|
2017-02-21 12:48:09 -05:00
|
|
|
/** @deprecated */
|
|
|
|
export declare type AnimationStateTransitionMetadata = any;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2017-02-21 12:48:09 -05:00
|
|
|
/** @deprecated */
|
|
|
|
export interface AnimationStyleMetadata extends AnimationMetadata {
|
2017-04-26 13:44:28 -04:00
|
|
|
offset: number | null;
|
|
|
|
styles: '*' | {
|
2016-06-22 17:56:10 -04:00
|
|
|
[key: string]: string | number;
|
2017-04-26 13:44:28 -04:00
|
|
|
} | Array<{
|
2017-03-01 20:13:06 -05:00
|
|
|
[key: string]: string | number;
|
2017-04-26 13:44:28 -04:00
|
|
|
} | '*'>;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2017-02-28 02:08:19 -05:00
|
|
|
/** @deprecated */
|
|
|
|
export declare type AnimationStyles = any;
|
2017-01-24 13:22:47 -05:00
|
|
|
|
2017-02-21 12:48:09 -05:00
|
|
|
/** @deprecated */
|
|
|
|
export interface AnimationTransitionEvent {
|
|
|
|
element: any;
|
2016-08-24 19:55:00 -04:00
|
|
|
fromState: string;
|
2016-10-18 20:16:51 -04:00
|
|
|
phaseName: string;
|
2016-08-24 19:55:00 -04:00
|
|
|
toState: string;
|
|
|
|
totalTime: number;
|
2016-12-20 19:02:50 -05:00
|
|
|
triggerName: string;
|
2016-08-24 19:55:00 -04:00
|
|
|
}
|
|
|
|
|
2017-02-21 12:48:09 -05:00
|
|
|
/** @deprecated */
|
|
|
|
export interface AnimationTransitionMetadata extends AnimationMetadata {
|
2017-03-01 20:13:06 -05:00
|
|
|
animation: AnimationMetadata | AnimationMetadata[];
|
2017-02-21 12:48:09 -05:00
|
|
|
expr: string | ((fromState: string, toState: string) => boolean);
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @deprecated */
|
|
|
|
export interface AnimationTriggerMetadata {
|
|
|
|
definitions: AnimationMetadata[];
|
|
|
|
name: string;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-08-02 10:54:14 -04:00
|
|
|
/** @experimental */
|
2017-01-03 19:54:46 -05:00
|
|
|
export declare const APP_BOOTSTRAP_LISTENER: InjectionToken<((compRef: ComponentRef<any>) => void)[]>;
|
2016-08-02 10:54:14 -04:00
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2017-01-03 19:54:46 -05:00
|
|
|
export declare const APP_ID: InjectionToken<string>;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2017-01-03 19:54:46 -05:00
|
|
|
export declare const APP_INITIALIZER: InjectionToken<(() => void)[]>;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-08-02 10:54:14 -04:00
|
|
|
/** @experimental */
|
|
|
|
export declare class ApplicationInitStatus {
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly done: boolean;
|
|
|
|
readonly donePromise: Promise<any>;
|
2016-08-02 10:54:14 -04:00
|
|
|
constructor(appInits: (() => any)[]);
|
|
|
|
}
|
|
|
|
|
2016-07-18 06:50:31 -04:00
|
|
|
/** @experimental */
|
|
|
|
export declare class ApplicationModule {
|
2017-03-14 17:32:26 -04:00
|
|
|
constructor(appRef: ApplicationRef);
|
2016-07-18 06:50:31 -04:00
|
|
|
}
|
|
|
|
|
2016-08-24 01:29:34 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare abstract class ApplicationRef {
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly abstract componentTypes: Type<any>[];
|
|
|
|
readonly abstract components: ComponentRef<any>[];
|
2017-02-03 08:42:22 -05:00
|
|
|
readonly abstract isStable: Observable<boolean>;
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly abstract viewCount: number;
|
2017-01-26 01:36:38 -05:00
|
|
|
abstract attachView(view: ViewRef): void;
|
2017-03-31 10:37:20 -04:00
|
|
|
abstract bootstrap<C>(componentFactory: ComponentFactory<C> | Type<C>, rootSelectorOrNode?: string | any): ComponentRef<C>;
|
2017-01-26 01:36:38 -05:00
|
|
|
abstract detachView(view: ViewRef): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
abstract tick(): void;
|
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare function asNativeElements(debugEls: DebugElement[]): any;
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare function assertPlatform(requiredToken: any): PlatformRef;
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-09-12 22:34:14 -04:00
|
|
|
export declare const Attribute: AttributeDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2017-02-21 12:48:09 -05:00
|
|
|
/** @deprecated */
|
2017-02-07 22:27:01 -05:00
|
|
|
export declare const AUTO_STYLE = "*";
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare enum ChangeDetectionStrategy {
|
2016-06-27 23:00:30 -04:00
|
|
|
OnPush = 0,
|
|
|
|
Default = 1,
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare abstract class ChangeDetectorRef {
|
2016-06-23 21:19:32 -04:00
|
|
|
abstract checkNoChanges(): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
abstract detach(): void;
|
|
|
|
abstract detectChanges(): void;
|
2016-06-23 21:19:32 -04:00
|
|
|
abstract markForCheck(): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
abstract reattach(): void;
|
|
|
|
}
|
|
|
|
|
2016-08-15 22:37:42 -04:00
|
|
|
/** @stable */
|
|
|
|
export interface ClassProvider {
|
|
|
|
multi?: boolean;
|
|
|
|
provide: any;
|
|
|
|
useClass: Type<any>;
|
|
|
|
}
|
|
|
|
|
2016-10-27 14:28:11 -04:00
|
|
|
/** @deprecated */
|
|
|
|
export interface CollectionChangeRecord<V> extends IterableChangeRecord<V> {
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-06-24 11:46:43 -04:00
|
|
|
/** @stable */
|
|
|
|
export declare class Compiler {
|
|
|
|
clearCache(): void;
|
2016-08-10 21:21:28 -04:00
|
|
|
clearCacheFor(type: Type<any>): void;
|
|
|
|
compileModuleAndAllComponentsAsync<T>(moduleType: Type<T>): Promise<ModuleWithComponentFactories<T>>;
|
|
|
|
compileModuleAndAllComponentsSync<T>(moduleType: Type<T>): ModuleWithComponentFactories<T>;
|
|
|
|
compileModuleAsync<T>(moduleType: Type<T>): Promise<NgModuleFactory<T>>;
|
|
|
|
compileModuleSync<T>(moduleType: Type<T>): NgModuleFactory<T>;
|
2017-03-14 17:55:37 -04:00
|
|
|
/** @deprecated */ getNgContentSelectors(component: Type<any>): string[];
|
2016-06-24 11:46:43 -04:00
|
|
|
}
|
|
|
|
|
2016-08-04 14:31:58 -04:00
|
|
|
/** @experimental */
|
2017-02-07 22:27:01 -05:00
|
|
|
export declare const COMPILER_OPTIONS: InjectionToken<CompilerOptions[]>;
|
2016-08-04 14:31:58 -04:00
|
|
|
|
refactor(core): clean up platform bootstrap and initTestEnvironment
- Introduces `CompilerFactory` which can be part of a `PlatformRef`.
- Introduces `WorkerAppModule`, `WorkerUiModule`, `ServerModule`
- Introduces `serverDynamicPlatform` for applications using runtime compilation
on the server.
- Changes browser bootstrap for runtime and offline compilation (see below for an example).
* introduces `bootstrapModule` and `bootstrapModuleFactory` in `@angular/core`
* introduces new `browserDynamicPlatform` in `@angular/platform-browser-dynamic
- Changes `initTestEnvironment` (which used to be `setBaseTestProviders`) to not take a compiler factory any more (see below for an example).
BREAKING CHANGE:
## Migration from `setBaseTestProviders` to `initTestEnvironment`:
- For the browser platform:
BEFORE:
```
import {setBaseTestProviders} from ‘@angular/core/testing’;
import {TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS} from ‘@angular/platform-browser-dynamic/testing’;
setBaseTestProviders(TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS);
```
AFTER:
```
import {initTestEnvironment} from ‘@angular/core/testing’;
import {browserDynamicTestPlatform,
BrowserDynamicTestModule} from ‘@angular/platform-browser-dynamic/testing’;
initTestEnvironment(
BrowserDynamicTestModule,
browserDynamicTestPlatform());
```
- For the server platform:
BEFORE:
```
import {setBaseTestProviders} from ‘@angular/core/testing’;
import {TEST_SERVER_PLATFORM_PROVIDERS,
TEST_SERVER_APPLICATION_PROVIDERS} from ‘@angular/platform-server/testing/server’;
setBaseTestProviders(TEST_SERVER_PLATFORM_PROVIDERS,
TEST_SERVER_APPLICATION_PROVIDERS);
```
AFTER:
```
import {initTestEnvironment} from ‘@angular/core/testing’;
import {serverTestPlatform,
ServerTestModule} from ‘@angular/platform-browser-dynamic/testing’;
initTestEnvironment(
ServerTestModule,
serverTestPlatform());
```
## Bootstrap changes
```
@AppModule({
modules: [BrowserModule],
precompile: [MainComponent],
providers: […], // additional providers
directives: […], // additional platform directives
pipes: […] // additional platform pipes
})
class MyModule {
constructor(appRef: ApplicationRef) {
appRef.bootstrap(MainComponent);
}
}
// offline compile
import {browserPlatform} from ‘@angular/platform-browser’;
import {bootstrapModuleFactory} from ‘@angular/core’;
bootstrapModuleFactory(MyModuleNgFactory, browserPlatform());
// runtime compile long form
import {browserDynamicPlatform} from ‘@angular/platform-browser-dynamic’;
import {bootstrapModule} from ‘@angular/core’;
bootstrapModule(MyModule, browserDynamicPlatform());
```
Closes #9922
Part of #9726
2016-07-08 13:47:17 -04:00
|
|
|
/** @experimental */
|
|
|
|
export declare abstract class CompilerFactory {
|
2016-07-18 06:50:31 -04:00
|
|
|
abstract createCompiler(options?: CompilerOptions[]): Compiler;
|
refactor(core): clean up platform bootstrap and initTestEnvironment
- Introduces `CompilerFactory` which can be part of a `PlatformRef`.
- Introduces `WorkerAppModule`, `WorkerUiModule`, `ServerModule`
- Introduces `serverDynamicPlatform` for applications using runtime compilation
on the server.
- Changes browser bootstrap for runtime and offline compilation (see below for an example).
* introduces `bootstrapModule` and `bootstrapModuleFactory` in `@angular/core`
* introduces new `browserDynamicPlatform` in `@angular/platform-browser-dynamic
- Changes `initTestEnvironment` (which used to be `setBaseTestProviders`) to not take a compiler factory any more (see below for an example).
BREAKING CHANGE:
## Migration from `setBaseTestProviders` to `initTestEnvironment`:
- For the browser platform:
BEFORE:
```
import {setBaseTestProviders} from ‘@angular/core/testing’;
import {TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS} from ‘@angular/platform-browser-dynamic/testing’;
setBaseTestProviders(TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS);
```
AFTER:
```
import {initTestEnvironment} from ‘@angular/core/testing’;
import {browserDynamicTestPlatform,
BrowserDynamicTestModule} from ‘@angular/platform-browser-dynamic/testing’;
initTestEnvironment(
BrowserDynamicTestModule,
browserDynamicTestPlatform());
```
- For the server platform:
BEFORE:
```
import {setBaseTestProviders} from ‘@angular/core/testing’;
import {TEST_SERVER_PLATFORM_PROVIDERS,
TEST_SERVER_APPLICATION_PROVIDERS} from ‘@angular/platform-server/testing/server’;
setBaseTestProviders(TEST_SERVER_PLATFORM_PROVIDERS,
TEST_SERVER_APPLICATION_PROVIDERS);
```
AFTER:
```
import {initTestEnvironment} from ‘@angular/core/testing’;
import {serverTestPlatform,
ServerTestModule} from ‘@angular/platform-browser-dynamic/testing’;
initTestEnvironment(
ServerTestModule,
serverTestPlatform());
```
## Bootstrap changes
```
@AppModule({
modules: [BrowserModule],
precompile: [MainComponent],
providers: […], // additional providers
directives: […], // additional platform directives
pipes: […] // additional platform pipes
})
class MyModule {
constructor(appRef: ApplicationRef) {
appRef.bootstrap(MainComponent);
}
}
// offline compile
import {browserPlatform} from ‘@angular/platform-browser’;
import {bootstrapModuleFactory} from ‘@angular/core’;
bootstrapModuleFactory(MyModuleNgFactory, browserPlatform());
// runtime compile long form
import {browserDynamicPlatform} from ‘@angular/platform-browser-dynamic’;
import {bootstrapModule} from ‘@angular/core’;
bootstrapModule(MyModule, browserDynamicPlatform());
```
Closes #9922
Part of #9726
2016-07-08 13:47:17 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/** @experimental */
|
2016-08-04 14:31:58 -04:00
|
|
|
export declare type CompilerOptions = {
|
|
|
|
useJit?: boolean;
|
|
|
|
defaultEncapsulation?: ViewEncapsulation;
|
perf: switch angular to use StaticInjector instead of ReflectiveInjector
This change allows ReflectiveInjector to be tree shaken resulting
in not needed Reflect polyfil and smaller bundles.
Code savings for HelloWorld using Closure:
Reflective: bundle.js: 105,864(34,190 gzip)
Static: bundle.js: 154,889(33,555 gzip)
645( 2%)
BREAKING CHANGE:
`platformXXXX()` no longer accepts providers which depend on reflection.
Specifically the method signature when from `Provider[]` to
`StaticProvider[]`.
Example:
Before:
```
[
MyClass,
{provide: ClassA, useClass: SubClassA}
]
```
After:
```
[
{provide: MyClass, deps: [Dep1,...]},
{provide: ClassA, useClass: SubClassA, deps: [Dep1,...]}
]
```
NOTE: This only applies to platform creation and providers for the JIT
compiler. It does not apply to `@Compotent` or `@NgModule` provides
declarations.
Benchpress note: Previously Benchpress also supported reflective
provides, which now require static providers.
DEPRECATION:
- `ReflectiveInjector` is now deprecated as it will be remove. Use
`Injector.create` as a replacement.
closes #18496
2017-08-03 15:33:29 -04:00
|
|
|
providers?: StaticProvider[];
|
2017-01-26 02:26:49 -05:00
|
|
|
missingTranslation?: MissingTranslationStrategy;
|
2017-01-10 22:07:03 -05:00
|
|
|
enableLegacyTemplate?: boolean;
|
2017-07-28 09:58:28 -04:00
|
|
|
preserveWhitespaces?: boolean;
|
2016-08-04 14:31:58 -04:00
|
|
|
};
|
refactor(core): clean up platform bootstrap and initTestEnvironment
- Introduces `CompilerFactory` which can be part of a `PlatformRef`.
- Introduces `WorkerAppModule`, `WorkerUiModule`, `ServerModule`
- Introduces `serverDynamicPlatform` for applications using runtime compilation
on the server.
- Changes browser bootstrap for runtime and offline compilation (see below for an example).
* introduces `bootstrapModule` and `bootstrapModuleFactory` in `@angular/core`
* introduces new `browserDynamicPlatform` in `@angular/platform-browser-dynamic
- Changes `initTestEnvironment` (which used to be `setBaseTestProviders`) to not take a compiler factory any more (see below for an example).
BREAKING CHANGE:
## Migration from `setBaseTestProviders` to `initTestEnvironment`:
- For the browser platform:
BEFORE:
```
import {setBaseTestProviders} from ‘@angular/core/testing’;
import {TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS} from ‘@angular/platform-browser-dynamic/testing’;
setBaseTestProviders(TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS);
```
AFTER:
```
import {initTestEnvironment} from ‘@angular/core/testing’;
import {browserDynamicTestPlatform,
BrowserDynamicTestModule} from ‘@angular/platform-browser-dynamic/testing’;
initTestEnvironment(
BrowserDynamicTestModule,
browserDynamicTestPlatform());
```
- For the server platform:
BEFORE:
```
import {setBaseTestProviders} from ‘@angular/core/testing’;
import {TEST_SERVER_PLATFORM_PROVIDERS,
TEST_SERVER_APPLICATION_PROVIDERS} from ‘@angular/platform-server/testing/server’;
setBaseTestProviders(TEST_SERVER_PLATFORM_PROVIDERS,
TEST_SERVER_APPLICATION_PROVIDERS);
```
AFTER:
```
import {initTestEnvironment} from ‘@angular/core/testing’;
import {serverTestPlatform,
ServerTestModule} from ‘@angular/platform-browser-dynamic/testing’;
initTestEnvironment(
ServerTestModule,
serverTestPlatform());
```
## Bootstrap changes
```
@AppModule({
modules: [BrowserModule],
precompile: [MainComponent],
providers: […], // additional providers
directives: […], // additional platform directives
pipes: […] // additional platform pipes
})
class MyModule {
constructor(appRef: ApplicationRef) {
appRef.bootstrap(MainComponent);
}
}
// offline compile
import {browserPlatform} from ‘@angular/platform-browser’;
import {bootstrapModuleFactory} from ‘@angular/core’;
bootstrapModuleFactory(MyModuleNgFactory, browserPlatform());
// runtime compile long form
import {browserDynamicPlatform} from ‘@angular/platform-browser-dynamic’;
import {bootstrapModule} from ‘@angular/core’;
bootstrapModule(MyModule, browserDynamicPlatform());
```
Closes #9922
Part of #9726
2016-07-08 13:47:17 -04:00
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-09-12 22:34:14 -04:00
|
|
|
export declare const Component: ComponentDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-09-14 18:12:25 -04:00
|
|
|
/** @stable */
|
|
|
|
export interface ComponentDecorator {
|
|
|
|
/** @stable */ (obj: Component): TypeDecorator;
|
|
|
|
new (obj: Component): Component;
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @stable */
|
2017-02-28 02:08:19 -05:00
|
|
|
export declare abstract class ComponentFactory<C> {
|
|
|
|
readonly abstract componentType: Type<any>;
|
2017-03-14 17:55:37 -04:00
|
|
|
readonly abstract inputs: {
|
|
|
|
propName: string;
|
|
|
|
templateName: string;
|
|
|
|
}[];
|
|
|
|
readonly abstract ngContentSelectors: string[];
|
|
|
|
readonly abstract outputs: {
|
|
|
|
propName: string;
|
|
|
|
templateName: string;
|
|
|
|
}[];
|
2017-02-28 02:08:19 -05:00
|
|
|
readonly abstract selector: string;
|
2017-03-14 19:26:17 -04:00
|
|
|
abstract create(injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string | any, ngModule?: NgModuleRef<any>): ComponentRef<C>;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare abstract class ComponentFactoryResolver {
|
2016-08-10 21:21:28 -04:00
|
|
|
abstract resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;
|
2016-06-23 21:19:32 -04:00
|
|
|
static NULL: ComponentFactoryResolver;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare abstract class ComponentRef<C> {
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly abstract changeDetectorRef: ChangeDetectorRef;
|
|
|
|
readonly abstract componentType: Type<any>;
|
|
|
|
readonly abstract hostView: ViewRef;
|
|
|
|
readonly abstract injector: Injector;
|
|
|
|
readonly abstract instance: C;
|
|
|
|
readonly abstract location: ElementRef;
|
2016-06-22 17:56:10 -04:00
|
|
|
abstract destroy(): void;
|
|
|
|
abstract onDestroy(callback: Function): void;
|
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-09-12 22:34:14 -04:00
|
|
|
export declare const ContentChild: ContentChildDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-09-14 14:51:26 -04:00
|
|
|
/** @stable */
|
|
|
|
export interface ContentChildDecorator {
|
2017-06-12 13:59:29 -04:00
|
|
|
/** @stable */ (selector: Type<any> | Function | string, opts?: {
|
2016-09-14 14:51:26 -04:00
|
|
|
read?: any;
|
|
|
|
}): any;
|
2017-06-12 13:59:29 -04:00
|
|
|
new (selector: Type<any> | Function | string, opts?: {
|
2016-09-14 14:51:26 -04:00
|
|
|
read?: any;
|
|
|
|
}): ContentChild;
|
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-09-12 22:34:14 -04:00
|
|
|
export declare const ContentChildren: ContentChildrenDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-09-14 14:51:26 -04:00
|
|
|
/** @stable */
|
|
|
|
export interface ContentChildrenDecorator {
|
2017-06-12 13:59:29 -04:00
|
|
|
/** @stable */ (selector: Type<any> | Function | string, opts?: {
|
2016-09-14 14:51:26 -04:00
|
|
|
descendants?: boolean;
|
|
|
|
read?: any;
|
|
|
|
}): any;
|
2017-06-12 13:59:29 -04:00
|
|
|
new (selector: Type<any> | Function | string, opts?: {
|
2016-09-14 14:51:26 -04:00
|
|
|
descendants?: boolean;
|
|
|
|
read?: any;
|
|
|
|
}): Query;
|
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare function createPlatform(injector: Injector): PlatformRef;
|
|
|
|
|
refactor(core): clean up platform bootstrap and initTestEnvironment
- Introduces `CompilerFactory` which can be part of a `PlatformRef`.
- Introduces `WorkerAppModule`, `WorkerUiModule`, `ServerModule`
- Introduces `serverDynamicPlatform` for applications using runtime compilation
on the server.
- Changes browser bootstrap for runtime and offline compilation (see below for an example).
* introduces `bootstrapModule` and `bootstrapModuleFactory` in `@angular/core`
* introduces new `browserDynamicPlatform` in `@angular/platform-browser-dynamic
- Changes `initTestEnvironment` (which used to be `setBaseTestProviders`) to not take a compiler factory any more (see below for an example).
BREAKING CHANGE:
## Migration from `setBaseTestProviders` to `initTestEnvironment`:
- For the browser platform:
BEFORE:
```
import {setBaseTestProviders} from ‘@angular/core/testing’;
import {TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS} from ‘@angular/platform-browser-dynamic/testing’;
setBaseTestProviders(TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS);
```
AFTER:
```
import {initTestEnvironment} from ‘@angular/core/testing’;
import {browserDynamicTestPlatform,
BrowserDynamicTestModule} from ‘@angular/platform-browser-dynamic/testing’;
initTestEnvironment(
BrowserDynamicTestModule,
browserDynamicTestPlatform());
```
- For the server platform:
BEFORE:
```
import {setBaseTestProviders} from ‘@angular/core/testing’;
import {TEST_SERVER_PLATFORM_PROVIDERS,
TEST_SERVER_APPLICATION_PROVIDERS} from ‘@angular/platform-server/testing/server’;
setBaseTestProviders(TEST_SERVER_PLATFORM_PROVIDERS,
TEST_SERVER_APPLICATION_PROVIDERS);
```
AFTER:
```
import {initTestEnvironment} from ‘@angular/core/testing’;
import {serverTestPlatform,
ServerTestModule} from ‘@angular/platform-browser-dynamic/testing’;
initTestEnvironment(
ServerTestModule,
serverTestPlatform());
```
## Bootstrap changes
```
@AppModule({
modules: [BrowserModule],
precompile: [MainComponent],
providers: […], // additional providers
directives: […], // additional platform directives
pipes: […] // additional platform pipes
})
class MyModule {
constructor(appRef: ApplicationRef) {
appRef.bootstrap(MainComponent);
}
}
// offline compile
import {browserPlatform} from ‘@angular/platform-browser’;
import {bootstrapModuleFactory} from ‘@angular/core’;
bootstrapModuleFactory(MyModuleNgFactory, browserPlatform());
// runtime compile long form
import {browserDynamicPlatform} from ‘@angular/platform-browser-dynamic’;
import {bootstrapModule} from ‘@angular/core’;
bootstrapModule(MyModule, browserDynamicPlatform());
```
Closes #9922
Part of #9726
2016-07-08 13:47:17 -04:00
|
|
|
/** @experimental */
|
perf: switch angular to use StaticInjector instead of ReflectiveInjector
This change allows ReflectiveInjector to be tree shaken resulting
in not needed Reflect polyfil and smaller bundles.
Code savings for HelloWorld using Closure:
Reflective: bundle.js: 105,864(34,190 gzip)
Static: bundle.js: 154,889(33,555 gzip)
645( 2%)
BREAKING CHANGE:
`platformXXXX()` no longer accepts providers which depend on reflection.
Specifically the method signature when from `Provider[]` to
`StaticProvider[]`.
Example:
Before:
```
[
MyClass,
{provide: ClassA, useClass: SubClassA}
]
```
After:
```
[
{provide: MyClass, deps: [Dep1,...]},
{provide: ClassA, useClass: SubClassA, deps: [Dep1,...]}
]
```
NOTE: This only applies to platform creation and providers for the JIT
compiler. It does not apply to `@Compotent` or `@NgModule` provides
declarations.
Benchpress note: Previously Benchpress also supported reflective
provides, which now require static providers.
DEPRECATION:
- `ReflectiveInjector` is now deprecated as it will be remove. Use
`Injector.create` as a replacement.
closes #18496
2017-08-03 15:33:29 -04:00
|
|
|
export declare function createPlatformFactory(parentPlatformFactory: ((extraProviders?: StaticProvider[]) => PlatformRef) | null, name: string, providers?: StaticProvider[]): (extraProviders?: StaticProvider[]) => PlatformRef;
|
refactor(core): clean up platform bootstrap and initTestEnvironment
- Introduces `CompilerFactory` which can be part of a `PlatformRef`.
- Introduces `WorkerAppModule`, `WorkerUiModule`, `ServerModule`
- Introduces `serverDynamicPlatform` for applications using runtime compilation
on the server.
- Changes browser bootstrap for runtime and offline compilation (see below for an example).
* introduces `bootstrapModule` and `bootstrapModuleFactory` in `@angular/core`
* introduces new `browserDynamicPlatform` in `@angular/platform-browser-dynamic
- Changes `initTestEnvironment` (which used to be `setBaseTestProviders`) to not take a compiler factory any more (see below for an example).
BREAKING CHANGE:
## Migration from `setBaseTestProviders` to `initTestEnvironment`:
- For the browser platform:
BEFORE:
```
import {setBaseTestProviders} from ‘@angular/core/testing’;
import {TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS} from ‘@angular/platform-browser-dynamic/testing’;
setBaseTestProviders(TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS);
```
AFTER:
```
import {initTestEnvironment} from ‘@angular/core/testing’;
import {browserDynamicTestPlatform,
BrowserDynamicTestModule} from ‘@angular/platform-browser-dynamic/testing’;
initTestEnvironment(
BrowserDynamicTestModule,
browserDynamicTestPlatform());
```
- For the server platform:
BEFORE:
```
import {setBaseTestProviders} from ‘@angular/core/testing’;
import {TEST_SERVER_PLATFORM_PROVIDERS,
TEST_SERVER_APPLICATION_PROVIDERS} from ‘@angular/platform-server/testing/server’;
setBaseTestProviders(TEST_SERVER_PLATFORM_PROVIDERS,
TEST_SERVER_APPLICATION_PROVIDERS);
```
AFTER:
```
import {initTestEnvironment} from ‘@angular/core/testing’;
import {serverTestPlatform,
ServerTestModule} from ‘@angular/platform-browser-dynamic/testing’;
initTestEnvironment(
ServerTestModule,
serverTestPlatform());
```
## Bootstrap changes
```
@AppModule({
modules: [BrowserModule],
precompile: [MainComponent],
providers: […], // additional providers
directives: […], // additional platform directives
pipes: […] // additional platform pipes
})
class MyModule {
constructor(appRef: ApplicationRef) {
appRef.bootstrap(MainComponent);
}
}
// offline compile
import {browserPlatform} from ‘@angular/platform-browser’;
import {bootstrapModuleFactory} from ‘@angular/core’;
bootstrapModuleFactory(MyModuleNgFactory, browserPlatform());
// runtime compile long form
import {browserDynamicPlatform} from ‘@angular/platform-browser-dynamic’;
import {bootstrapModule} from ‘@angular/core’;
bootstrapModule(MyModule, browserDynamicPlatform());
```
Closes #9922
Part of #9726
2016-07-08 13:47:17 -04:00
|
|
|
|
2016-08-24 01:29:34 -04:00
|
|
|
/** @stable */
|
2016-07-25 08:47:16 -04:00
|
|
|
export declare const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata;
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class DebugElement extends DebugNode {
|
|
|
|
attributes: {
|
2017-03-29 12:34:45 -04:00
|
|
|
[key: string]: string | null;
|
2016-06-22 17:56:10 -04:00
|
|
|
};
|
2016-06-23 21:19:32 -04:00
|
|
|
childNodes: DebugNode[];
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly children: DebugElement[];
|
2016-06-22 17:56:10 -04:00
|
|
|
classes: {
|
|
|
|
[key: string]: boolean;
|
|
|
|
};
|
2016-06-23 21:19:32 -04:00
|
|
|
name: string;
|
|
|
|
nativeElement: any;
|
|
|
|
properties: {
|
|
|
|
[key: string]: any;
|
|
|
|
};
|
2016-06-22 17:56:10 -04:00
|
|
|
styles: {
|
2017-03-29 12:34:45 -04:00
|
|
|
[key: string]: string | null;
|
2016-06-22 17:56:10 -04:00
|
|
|
};
|
2017-03-14 12:16:15 -04:00
|
|
|
constructor(nativeNode: any, parent: any, _debugContext: DebugContext);
|
2016-06-22 17:56:10 -04:00
|
|
|
addChild(child: DebugNode): void;
|
2017-02-15 00:03:18 -05:00
|
|
|
insertBefore(refChild: DebugNode, newChild: DebugNode): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
insertChildrenAfter(child: DebugNode, newChildren: DebugNode[]): void;
|
|
|
|
query(predicate: Predicate<DebugElement>): DebugElement;
|
|
|
|
queryAll(predicate: Predicate<DebugElement>): DebugElement[];
|
|
|
|
queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[];
|
2016-06-23 21:19:32 -04:00
|
|
|
removeChild(child: DebugNode): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
triggerEventHandler(eventName: string, eventObj: any): void;
|
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class DebugNode {
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly componentInstance: any;
|
|
|
|
readonly context: any;
|
|
|
|
readonly injector: Injector;
|
2016-06-23 21:19:32 -04:00
|
|
|
listeners: EventListener[];
|
|
|
|
nativeNode: any;
|
2017-03-29 12:34:45 -04:00
|
|
|
parent: DebugElement | null;
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly providerTokens: any[];
|
|
|
|
readonly references: {
|
2016-06-22 17:56:10 -04:00
|
|
|
[key: string]: any;
|
|
|
|
};
|
2017-03-29 12:34:45 -04:00
|
|
|
constructor(nativeNode: any, parent: DebugNode | null, _debugContext: DebugContext);
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-10-27 14:28:11 -04:00
|
|
|
/** @deprecated */
|
|
|
|
export declare class DefaultIterableDiffer<V> implements IterableDiffer<V>, IterableChanges<V> {
|
2017-04-14 17:40:56 -04:00
|
|
|
readonly collection: V[] | Iterable<V> | null;
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly isDirty: boolean;
|
|
|
|
readonly length: number;
|
2017-03-29 12:34:45 -04:00
|
|
|
constructor(trackByFn?: TrackByFunction<V>);
|
2017-01-25 16:45:06 -05:00
|
|
|
check(collection: NgIterable<V>): boolean;
|
2017-03-29 12:34:45 -04:00
|
|
|
diff(collection: NgIterable<V>): DefaultIterableDiffer<V> | null;
|
2016-10-27 14:28:11 -04:00
|
|
|
forEachAddedItem(fn: (record: IterableChangeRecord_<V>) => void): void;
|
|
|
|
forEachIdentityChange(fn: (record: IterableChangeRecord_<V>) => void): void;
|
|
|
|
forEachItem(fn: (record: IterableChangeRecord_<V>) => void): void;
|
|
|
|
forEachMovedItem(fn: (record: IterableChangeRecord_<V>) => void): void;
|
2017-03-29 12:34:45 -04:00
|
|
|
forEachOperation(fn: (item: IterableChangeRecord<V>, previousIndex: number | null, currentIndex: number | null) => void): void;
|
2016-10-27 14:28:11 -04:00
|
|
|
forEachPreviousItem(fn: (record: IterableChangeRecord_<V>) => void): void;
|
|
|
|
forEachRemovedItem(fn: (record: IterableChangeRecord_<V>) => void): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
onDestroy(): void;
|
|
|
|
}
|
|
|
|
|
2016-08-12 17:15:37 -04:00
|
|
|
/** @experimental */
|
|
|
|
export declare function destroyPlatform(): void;
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-09-12 22:34:14 -04:00
|
|
|
export declare const Directive: DirectiveDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-09-14 18:12:25 -04:00
|
|
|
export interface DirectiveDecorator {
|
|
|
|
/** @stable */ (obj: Directive): TypeDecorator;
|
|
|
|
new (obj: Directive): Directive;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @stable */
|
2017-02-23 21:04:51 -05:00
|
|
|
export interface DoCheck {
|
|
|
|
ngDoCheck(): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class ElementRef {
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */ nativeElement: any;
|
2016-06-22 17:56:10 -04:00
|
|
|
constructor(nativeElement: any);
|
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare abstract class EmbeddedViewRef<C> extends ViewRef {
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly abstract context: C;
|
|
|
|
readonly abstract rootNodes: any[];
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-08-24 01:29:34 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare function enableProdMode(): void;
|
|
|
|
|
2016-08-25 03:50:16 -04:00
|
|
|
/** @stable */
|
|
|
|
export declare class ErrorHandler {
|
|
|
|
handleError(error: any): void;
|
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class EventEmitter<T> extends Subject<T> {
|
|
|
|
__isAsync: boolean;
|
|
|
|
constructor(isAsync?: boolean);
|
2016-07-22 13:19:57 -04:00
|
|
|
emit(value?: T): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
subscribe(generatorOrNext?: any, error?: any, complete?: any): any;
|
|
|
|
}
|
|
|
|
|
2016-08-15 22:37:42 -04:00
|
|
|
/** @stable */
|
|
|
|
export interface ExistingProvider {
|
|
|
|
multi?: boolean;
|
|
|
|
provide: any;
|
|
|
|
useExisting: any;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @stable */
|
|
|
|
export interface FactoryProvider {
|
2016-08-24 15:53:28 -04:00
|
|
|
deps?: any[];
|
2016-08-15 22:37:42 -04:00
|
|
|
multi?: boolean;
|
|
|
|
provide: any;
|
|
|
|
useFactory: Function;
|
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2016-08-10 21:21:28 -04:00
|
|
|
export declare function forwardRef(forwardRefFn: ForwardRefFn): Type<any>;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export interface ForwardRefFn {
|
|
|
|
(): any;
|
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2017-03-29 12:34:45 -04:00
|
|
|
export declare function getDebugNode(nativeNode: any): DebugNode | null;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-09-01 16:46:08 -04:00
|
|
|
/** @experimental */
|
|
|
|
export declare function getModuleFactory(id: string): NgModuleFactory<any>;
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2017-03-29 12:34:45 -04:00
|
|
|
export declare function getPlatform(): PlatformRef | null;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export interface GetTestability {
|
|
|
|
addToWindow(registry: TestabilityRegistry): void;
|
2017-03-29 12:34:45 -04:00
|
|
|
findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean): Testability | null;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2017-02-21 12:48:09 -05:00
|
|
|
/** @deprecated */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare function group(steps: AnimationMetadata[]): AnimationGroupMetadata;
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-09-12 22:34:14 -04:00
|
|
|
export declare const Host: HostDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-09-12 22:34:14 -04:00
|
|
|
export declare const HostBinding: HostBindingDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-09-12 22:34:14 -04:00
|
|
|
export interface HostDecorator {
|
|
|
|
/** @stable */ (): any;
|
|
|
|
new (): Host;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-09-12 22:34:14 -04:00
|
|
|
export declare const HostListener: HostListenerDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-09-12 22:34:14 -04:00
|
|
|
export declare const Inject: InjectDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-09-12 22:34:14 -04:00
|
|
|
export declare const Injectable: InjectableDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-09-12 22:34:14 -04:00
|
|
|
export interface InjectableDecorator {
|
|
|
|
/** @stable */ (): any;
|
|
|
|
new (): Injectable;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-09-12 22:34:14 -04:00
|
|
|
export interface InjectDecorator {
|
|
|
|
/** @stable */ (token: any): any;
|
|
|
|
new (token: any): Inject;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2017-01-03 19:54:46 -05:00
|
|
|
/** @stable */
|
2017-08-31 04:56:26 -04:00
|
|
|
export declare class InjectionToken<T> {
|
|
|
|
protected _desc: string;
|
|
|
|
constructor(_desc: string);
|
2017-01-03 19:54:46 -05:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare abstract class Injector {
|
2017-01-26 01:36:38 -05:00
|
|
|
abstract get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T): T;
|
|
|
|
/** @deprecated */ abstract get(token: any, notFoundValue?: any): any;
|
2016-06-28 12:54:42 -04:00
|
|
|
static NULL: Injector;
|
2016-06-23 21:19:32 -04:00
|
|
|
static THROW_IF_NOT_FOUND: Object;
|
2017-07-27 16:49:33 -04:00
|
|
|
static create(providers: StaticProvider[], parent?: Injector): Injector;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-09-12 22:34:14 -04:00
|
|
|
export declare const Input: InputDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare function isDevMode(): boolean;
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-10-27 14:28:11 -04:00
|
|
|
export interface IterableChangeRecord<V> {
|
2017-03-29 12:34:45 -04:00
|
|
|
readonly currentIndex: number | null;
|
|
|
|
readonly item: V;
|
|
|
|
readonly previousIndex: number | null;
|
|
|
|
readonly trackById: any;
|
2016-10-27 14:28:11 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/** @stable */
|
|
|
|
export interface IterableChanges<V> {
|
|
|
|
forEachAddedItem(fn: (record: IterableChangeRecord<V>) => void): void;
|
|
|
|
forEachIdentityChange(fn: (record: IterableChangeRecord<V>) => void): void;
|
|
|
|
forEachItem(fn: (record: IterableChangeRecord<V>) => void): void;
|
|
|
|
forEachMovedItem(fn: (record: IterableChangeRecord<V>) => void): void;
|
|
|
|
forEachOperation(fn: (record: IterableChangeRecord<V>, previousIndex: number, currentIndex: number) => void): void;
|
|
|
|
forEachPreviousItem(fn: (record: IterableChangeRecord<V>) => void): void;
|
|
|
|
forEachRemovedItem(fn: (record: IterableChangeRecord<V>) => void): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @stable */
|
|
|
|
export interface IterableDiffer<V> {
|
2017-03-29 12:34:45 -04:00
|
|
|
diff(object: NgIterable<V>): IterableChanges<V> | null;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export interface IterableDifferFactory {
|
2017-02-09 16:33:44 -05:00
|
|
|
create<V>(trackByFn?: TrackByFunction<V>): IterableDiffer<V>;
|
2016-06-23 21:19:32 -04:00
|
|
|
supports(objects: any): boolean;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class IterableDiffers {
|
2016-10-27 14:28:11 -04:00
|
|
|
/** @deprecated */ factories: IterableDifferFactory[];
|
2016-06-22 17:56:10 -04:00
|
|
|
constructor(factories: IterableDifferFactory[]);
|
2016-06-23 21:19:32 -04:00
|
|
|
find(iterable: any): IterableDifferFactory;
|
2016-06-22 17:56:10 -04:00
|
|
|
static create(factories: IterableDifferFactory[], parent?: IterableDiffers): IterableDiffers;
|
perf: switch angular to use StaticInjector instead of ReflectiveInjector
This change allows ReflectiveInjector to be tree shaken resulting
in not needed Reflect polyfil and smaller bundles.
Code savings for HelloWorld using Closure:
Reflective: bundle.js: 105,864(34,190 gzip)
Static: bundle.js: 154,889(33,555 gzip)
645( 2%)
BREAKING CHANGE:
`platformXXXX()` no longer accepts providers which depend on reflection.
Specifically the method signature when from `Provider[]` to
`StaticProvider[]`.
Example:
Before:
```
[
MyClass,
{provide: ClassA, useClass: SubClassA}
]
```
After:
```
[
{provide: MyClass, deps: [Dep1,...]},
{provide: ClassA, useClass: SubClassA, deps: [Dep1,...]}
]
```
NOTE: This only applies to platform creation and providers for the JIT
compiler. It does not apply to `@Compotent` or `@NgModule` provides
declarations.
Benchpress note: Previously Benchpress also supported reflective
provides, which now require static providers.
DEPRECATION:
- `ReflectiveInjector` is now deprecated as it will be remove. Use
`Injector.create` as a replacement.
closes #18496
2017-08-03 15:33:29 -04:00
|
|
|
static extend(factories: IterableDifferFactory[]): StaticProvider;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2017-02-21 12:48:09 -05:00
|
|
|
/** @deprecated */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare function keyframes(steps: AnimationStyleMetadata[]): AnimationKeyframesSequenceMetadata;
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-10-27 14:28:11 -04:00
|
|
|
export interface KeyValueChangeRecord<K, V> {
|
2017-03-29 12:34:45 -04:00
|
|
|
readonly currentValue: V | null;
|
|
|
|
readonly key: K;
|
|
|
|
readonly previousValue: V | null;
|
2016-10-27 14:28:11 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/** @stable */
|
|
|
|
export interface KeyValueChanges<K, V> {
|
|
|
|
forEachAddedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
|
|
|
|
forEachChangedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
|
|
|
|
forEachItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
|
|
|
|
forEachPreviousItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
|
|
|
|
forEachRemovedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @stable */
|
2016-10-27 14:28:11 -04:00
|
|
|
export interface KeyValueDiffer<K, V> {
|
|
|
|
diff(object: Map<K, V>): KeyValueChanges<K, V>;
|
|
|
|
diff(object: {
|
|
|
|
[key: string]: V;
|
|
|
|
}): KeyValueChanges<string, V>;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export interface KeyValueDifferFactory {
|
2017-02-09 16:33:44 -05:00
|
|
|
create<K, V>(): KeyValueDiffer<K, V>;
|
2016-06-23 21:19:32 -04:00
|
|
|
supports(objects: any): boolean;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class KeyValueDiffers {
|
2016-10-27 14:28:11 -04:00
|
|
|
/** @deprecated */ factories: KeyValueDifferFactory[];
|
2016-06-22 17:56:10 -04:00
|
|
|
constructor(factories: KeyValueDifferFactory[]);
|
2016-10-27 14:28:11 -04:00
|
|
|
find(kv: any): KeyValueDifferFactory;
|
|
|
|
static create<S>(factories: KeyValueDifferFactory[], parent?: KeyValueDiffers): KeyValueDiffers;
|
perf: switch angular to use StaticInjector instead of ReflectiveInjector
This change allows ReflectiveInjector to be tree shaken resulting
in not needed Reflect polyfil and smaller bundles.
Code savings for HelloWorld using Closure:
Reflective: bundle.js: 105,864(34,190 gzip)
Static: bundle.js: 154,889(33,555 gzip)
645( 2%)
BREAKING CHANGE:
`platformXXXX()` no longer accepts providers which depend on reflection.
Specifically the method signature when from `Provider[]` to
`StaticProvider[]`.
Example:
Before:
```
[
MyClass,
{provide: ClassA, useClass: SubClassA}
]
```
After:
```
[
{provide: MyClass, deps: [Dep1,...]},
{provide: ClassA, useClass: SubClassA, deps: [Dep1,...]}
]
```
NOTE: This only applies to platform creation and providers for the JIT
compiler. It does not apply to `@Compotent` or `@NgModule` provides
declarations.
Benchpress note: Previously Benchpress also supported reflective
provides, which now require static providers.
DEPRECATION:
- `ReflectiveInjector` is now deprecated as it will be remove. Use
`Injector.create` as a replacement.
closes #18496
2017-08-03 15:33:29 -04:00
|
|
|
static extend<S>(factories: KeyValueDifferFactory[]): StaticProvider;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-08-12 17:45:36 -04:00
|
|
|
/** @experimental */
|
2017-01-03 19:54:46 -05:00
|
|
|
export declare const LOCALE_ID: InjectionToken<string>;
|
2016-08-12 17:45:36 -04:00
|
|
|
|
2017-01-10 08:14:41 -05:00
|
|
|
/** @experimental */
|
|
|
|
export declare enum MissingTranslationStrategy {
|
|
|
|
Error = 0,
|
|
|
|
Warning = 1,
|
|
|
|
Ignore = 2,
|
|
|
|
}
|
|
|
|
|
2016-07-29 07:19:02 -04:00
|
|
|
/** @experimental */
|
|
|
|
export declare class ModuleWithComponentFactories<T> {
|
|
|
|
componentFactories: ComponentFactory<any>[];
|
|
|
|
ngModuleFactory: NgModuleFactory<T>;
|
|
|
|
constructor(ngModuleFactory: NgModuleFactory<T>, componentFactories: ComponentFactory<any>[]);
|
|
|
|
}
|
|
|
|
|
2016-08-24 01:29:34 -04:00
|
|
|
/** @stable */
|
2016-07-25 08:47:16 -04:00
|
|
|
export interface ModuleWithProviders {
|
2016-08-10 21:21:28 -04:00
|
|
|
ngModule: Type<any>;
|
2016-08-24 16:39:44 -04:00
|
|
|
providers?: Provider[];
|
2016-07-25 08:47:16 -04:00
|
|
|
}
|
|
|
|
|
2017-01-25 16:45:06 -05:00
|
|
|
/** @stable */
|
|
|
|
export declare type NgIterable<T> = Array<T> | Iterable<T>;
|
|
|
|
|
2016-08-24 01:29:34 -04:00
|
|
|
/** @stable */
|
2016-09-12 22:34:14 -04:00
|
|
|
export declare const NgModule: NgModuleDecorator;
|
2016-07-18 06:50:31 -04:00
|
|
|
|
|
|
|
/** @experimental */
|
2017-05-11 13:26:02 -04:00
|
|
|
export declare abstract class NgModuleFactory<T> {
|
|
|
|
readonly abstract moduleType: Type<T>;
|
|
|
|
abstract create(parentInjector: Injector | null): NgModuleRef<T>;
|
2016-07-18 06:50:31 -04:00
|
|
|
}
|
|
|
|
|
2016-08-24 01:29:34 -04:00
|
|
|
/** @stable */
|
2016-07-18 06:50:31 -04:00
|
|
|
export declare abstract class NgModuleFactoryLoader {
|
|
|
|
abstract load(path: string): Promise<NgModuleFactory<any>>;
|
|
|
|
}
|
|
|
|
|
2016-08-24 01:29:34 -04:00
|
|
|
/** @stable */
|
2016-07-18 06:50:31 -04:00
|
|
|
export declare abstract class NgModuleRef<T> {
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly abstract componentFactoryResolver: ComponentFactoryResolver;
|
|
|
|
readonly abstract injector: Injector;
|
|
|
|
readonly abstract instance: T;
|
2016-08-02 10:54:14 -04:00
|
|
|
abstract destroy(): void;
|
|
|
|
abstract onDestroy(callback: () => void): void;
|
2016-07-18 06:50:31 -04:00
|
|
|
}
|
|
|
|
|
2016-11-09 17:58:40 -05:00
|
|
|
/** @experimental */
|
|
|
|
export declare class NgProbeToken {
|
|
|
|
name: string;
|
|
|
|
token: any;
|
|
|
|
constructor(name: string, token: any);
|
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class NgZone {
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly hasPendingMacrotasks: boolean;
|
|
|
|
readonly hasPendingMicrotasks: boolean;
|
|
|
|
readonly isStable: boolean;
|
|
|
|
readonly onError: EventEmitter<any>;
|
|
|
|
readonly onMicrotaskEmpty: EventEmitter<any>;
|
|
|
|
readonly onStable: EventEmitter<any>;
|
|
|
|
readonly onUnstable: EventEmitter<any>;
|
2016-06-22 17:56:10 -04:00
|
|
|
constructor({enableLongStackTrace}: {
|
|
|
|
enableLongStackTrace?: boolean;
|
|
|
|
});
|
2017-07-13 18:36:11 -04:00
|
|
|
run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T;
|
|
|
|
runGuarded<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T;
|
|
|
|
runOutsideAngular<T>(fn: (...args: any[]) => T): T;
|
|
|
|
runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[], name?: string): T;
|
2016-06-23 21:19:32 -04:00
|
|
|
static assertInAngularZone(): void;
|
|
|
|
static assertNotInAngularZone(): void;
|
|
|
|
static isInAngularZone(): boolean;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-08-19 19:05:34 -04:00
|
|
|
/** @experimental */
|
|
|
|
export declare const NO_ERRORS_SCHEMA: SchemaMetadata;
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2017-02-23 21:04:51 -05:00
|
|
|
export interface OnChanges {
|
|
|
|
ngOnChanges(changes: SimpleChanges): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2017-02-23 21:04:51 -05:00
|
|
|
export interface OnDestroy {
|
|
|
|
ngOnDestroy(): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2017-02-23 21:04:51 -05:00
|
|
|
export interface OnInit {
|
|
|
|
ngOnInit(): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-09-12 22:34:14 -04:00
|
|
|
export declare const Optional: OptionalDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-09-12 22:34:14 -04:00
|
|
|
export interface OptionalDecorator {
|
|
|
|
/** @stable */ (): any;
|
|
|
|
new (): Optional;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-09-12 22:34:14 -04:00
|
|
|
export declare const Output: OutputDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2017-01-03 19:54:46 -05:00
|
|
|
export declare const PACKAGE_ROOT_URL: InjectionToken<string>;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-09-12 22:34:14 -04:00
|
|
|
export declare const Pipe: PipeDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export interface PipeTransform {
|
|
|
|
transform(value: any, ...args: any[]): any;
|
|
|
|
}
|
|
|
|
|
2017-02-22 19:49:46 -05:00
|
|
|
/** @experimental */
|
|
|
|
export declare const PLATFORM_ID: InjectionToken<Object>;
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2017-01-03 19:54:46 -05:00
|
|
|
export declare const PLATFORM_INITIALIZER: InjectionToken<(() => void)[]>;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-07-25 08:47:16 -04:00
|
|
|
/** @experimental */
|
perf: switch angular to use StaticInjector instead of ReflectiveInjector
This change allows ReflectiveInjector to be tree shaken resulting
in not needed Reflect polyfil and smaller bundles.
Code savings for HelloWorld using Closure:
Reflective: bundle.js: 105,864(34,190 gzip)
Static: bundle.js: 154,889(33,555 gzip)
645( 2%)
BREAKING CHANGE:
`platformXXXX()` no longer accepts providers which depend on reflection.
Specifically the method signature when from `Provider[]` to
`StaticProvider[]`.
Example:
Before:
```
[
MyClass,
{provide: ClassA, useClass: SubClassA}
]
```
After:
```
[
{provide: MyClass, deps: [Dep1,...]},
{provide: ClassA, useClass: SubClassA, deps: [Dep1,...]}
]
```
NOTE: This only applies to platform creation and providers for the JIT
compiler. It does not apply to `@Compotent` or `@NgModule` provides
declarations.
Benchpress note: Previously Benchpress also supported reflective
provides, which now require static providers.
DEPRECATION:
- `ReflectiveInjector` is now deprecated as it will be remove. Use
`Injector.create` as a replacement.
closes #18496
2017-08-03 15:33:29 -04:00
|
|
|
export declare const platformCore: (extraProviders?: StaticProvider[] | undefined) => PlatformRef;
|
2016-07-25 08:47:16 -04:00
|
|
|
|
2016-08-24 01:29:34 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare abstract class PlatformRef {
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly abstract destroyed: boolean;
|
|
|
|
readonly abstract injector: Injector;
|
2017-01-26 01:36:38 -05:00
|
|
|
/** @stable */ abstract bootstrapModule<M>(moduleType: Type<M>, compilerOptions?: CompilerOptions | CompilerOptions[]): Promise<NgModuleRef<M>>;
|
|
|
|
/** @experimental */ abstract bootstrapModuleFactory<M>(moduleFactory: NgModuleFactory<M>): Promise<NgModuleRef<M>>;
|
2016-08-02 10:54:14 -04:00
|
|
|
abstract destroy(): void;
|
|
|
|
abstract onDestroy(callback: () => void): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2017-03-01 17:10:59 -05:00
|
|
|
/** @experimental */
|
|
|
|
export interface Predicate<T> {
|
2017-03-29 12:34:45 -04:00
|
|
|
(value: T): boolean;
|
2017-03-01 17:10:59 -05:00
|
|
|
}
|
|
|
|
|
2016-08-15 22:37:42 -04:00
|
|
|
/** @stable */
|
|
|
|
export declare type Provider = TypeProvider | ValueProvider | ClassProvider | ExistingProvider | FactoryProvider | any[];
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-09-12 22:34:14 -04:00
|
|
|
/** @stable */
|
|
|
|
export declare abstract class Query {
|
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class QueryList<T> {
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly changes: Observable<any>;
|
|
|
|
readonly dirty: boolean;
|
|
|
|
readonly first: T;
|
|
|
|
readonly last: T;
|
|
|
|
readonly length: number;
|
2016-06-22 17:56:10 -04:00
|
|
|
filter(fn: (item: T, index: number, array: T[]) => boolean): T[];
|
2017-03-29 12:34:45 -04:00
|
|
|
find(fn: (item: T, index: number, array: T[]) => boolean): T | undefined;
|
2016-06-22 17:56:10 -04:00
|
|
|
forEach(fn: (item: T, index: number, array: T[]) => void): void;
|
2016-06-23 21:19:32 -04:00
|
|
|
map<U>(fn: (item: T, index: number, array: T[]) => U): U[];
|
|
|
|
notifyOnChanges(): void;
|
|
|
|
reduce<U>(fn: (prevValue: U, curValue: T, curIndex: number, array: T[]) => U, init: U): U;
|
|
|
|
reset(res: Array<T | any[]>): void;
|
|
|
|
setDirty(): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
some(fn: (value: T, index: number, array: T[]) => boolean): boolean;
|
|
|
|
toArray(): T[];
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2017-08-09 03:18:05 -04:00
|
|
|
/** @deprecated */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare abstract class ReflectiveInjector implements Injector {
|
2017-03-29 12:34:45 -04:00
|
|
|
readonly abstract parent: Injector | null;
|
2017-01-26 01:36:38 -05:00
|
|
|
abstract createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector;
|
2016-06-23 21:19:32 -04:00
|
|
|
abstract get(token: any, notFoundValue?: any): any;
|
2017-01-26 01:36:38 -05:00
|
|
|
abstract instantiateResolved(provider: ResolvedReflectiveProvider): any;
|
|
|
|
abstract resolveAndCreateChild(providers: Provider[]): ReflectiveInjector;
|
|
|
|
abstract resolveAndInstantiate(provider: Provider): any;
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */ static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector): ReflectiveInjector;
|
2016-08-15 22:37:42 -04:00
|
|
|
static resolve(providers: Provider[]): ResolvedReflectiveProvider[];
|
|
|
|
static resolveAndCreate(providers: Provider[], parent?: Injector): ReflectiveInjector;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
perf: switch angular to use StaticInjector instead of ReflectiveInjector
This change allows ReflectiveInjector to be tree shaken resulting
in not needed Reflect polyfil and smaller bundles.
Code savings for HelloWorld using Closure:
Reflective: bundle.js: 105,864(34,190 gzip)
Static: bundle.js: 154,889(33,555 gzip)
645( 2%)
BREAKING CHANGE:
`platformXXXX()` no longer accepts providers which depend on reflection.
Specifically the method signature when from `Provider[]` to
`StaticProvider[]`.
Example:
Before:
```
[
MyClass,
{provide: ClassA, useClass: SubClassA}
]
```
After:
```
[
{provide: MyClass, deps: [Dep1,...]},
{provide: ClassA, useClass: SubClassA, deps: [Dep1,...]}
]
```
NOTE: This only applies to platform creation and providers for the JIT
compiler. It does not apply to `@Compotent` or `@NgModule` provides
declarations.
Benchpress note: Previously Benchpress also supported reflective
provides, which now require static providers.
DEPRECATION:
- `ReflectiveInjector` is now deprecated as it will be remove. Use
`Injector.create` as a replacement.
closes #18496
2017-08-03 15:33:29 -04:00
|
|
|
/** @deprecated */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class ReflectiveKey {
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly displayName: string;
|
2016-06-22 17:56:10 -04:00
|
|
|
id: number;
|
2016-06-23 21:19:32 -04:00
|
|
|
token: Object;
|
2016-06-22 17:56:10 -04:00
|
|
|
constructor(token: Object, id: number);
|
2017-02-07 22:27:01 -05:00
|
|
|
static readonly numberOfKeys: number;
|
2016-06-23 21:19:32 -04:00
|
|
|
static get(token: Object): ReflectiveKey;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2017-02-20 11:00:31 -05:00
|
|
|
/** @deprecated */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class RenderComponentType {
|
2017-02-22 18:14:49 -05:00
|
|
|
animations: any;
|
2016-06-23 21:19:32 -04:00
|
|
|
encapsulation: ViewEncapsulation;
|
2016-06-22 17:56:10 -04:00
|
|
|
id: string;
|
|
|
|
slotCount: number;
|
|
|
|
styles: Array<string | any[]>;
|
2016-06-23 21:19:32 -04:00
|
|
|
templateUrl: string;
|
2017-02-22 18:14:49 -05:00
|
|
|
constructor(id: string, templateUrl: string, slotCount: number, encapsulation: ViewEncapsulation, styles: Array<string | any[]>, animations: any);
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2017-02-20 11:00:31 -05:00
|
|
|
/** @deprecated */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare abstract class Renderer {
|
2017-02-28 02:08:19 -05:00
|
|
|
abstract animate(element: any, startingStyles: any, keyframes: any[], duration: number, delay: number, easing: string, previousPlayers?: any[]): any;
|
2016-06-23 21:19:32 -04:00
|
|
|
abstract attachViewAfter(node: any, viewRootNodes: any[]): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
abstract createElement(parentElement: any, name: string, debugInfo?: RenderDebugInfo): any;
|
|
|
|
abstract createTemplateAnchor(parentElement: any, debugInfo?: RenderDebugInfo): any;
|
|
|
|
abstract createText(parentElement: any, value: string, debugInfo?: RenderDebugInfo): any;
|
2016-06-23 21:19:32 -04:00
|
|
|
abstract createViewRoot(hostElement: any): any;
|
2016-06-22 17:56:10 -04:00
|
|
|
abstract destroyView(hostElement: any, viewAllNodes: any[]): void;
|
2016-06-23 21:19:32 -04:00
|
|
|
abstract detachView(viewRootNodes: any[]): void;
|
2016-07-12 13:26:54 -04:00
|
|
|
abstract invokeElementMethod(renderElement: any, methodName: string, args?: any[]): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
abstract listen(renderElement: any, name: string, callback: Function): Function;
|
|
|
|
abstract listenGlobal(target: string, name: string, callback: Function): Function;
|
2016-06-23 21:19:32 -04:00
|
|
|
abstract projectNodes(parentElement: any, nodes: any[]): void;
|
|
|
|
abstract selectRootElement(selectorOrNode: string | any, debugInfo?: RenderDebugInfo): any;
|
2016-06-22 17:56:10 -04:00
|
|
|
abstract setBindingDebugInfo(renderElement: any, propertyName: string, propertyValue: string): void;
|
2016-06-23 21:19:32 -04:00
|
|
|
abstract setElementAttribute(renderElement: any, attributeName: string, attributeValue: string): void;
|
2016-07-12 13:26:54 -04:00
|
|
|
abstract setElementClass(renderElement: any, className: string, isAdd: boolean): void;
|
2016-06-23 21:19:32 -04:00
|
|
|
abstract setElementProperty(renderElement: any, propertyName: string, propertyValue: any): void;
|
2016-07-12 13:26:54 -04:00
|
|
|
abstract setElementStyle(renderElement: any, styleName: string, styleValue: string): void;
|
|
|
|
abstract setText(renderNode: any, text: string): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2017-02-15 00:03:18 -05:00
|
|
|
/** @experimental */
|
2017-03-07 19:36:12 -05:00
|
|
|
export declare abstract class Renderer2 {
|
2017-02-24 15:10:19 -05:00
|
|
|
readonly abstract data: {
|
|
|
|
[key: string]: any;
|
|
|
|
};
|
2017-03-29 12:34:45 -04:00
|
|
|
destroyNode: ((node: any) => void) | null;
|
2017-02-15 00:03:18 -05:00
|
|
|
abstract addClass(el: any, name: string): void;
|
|
|
|
abstract appendChild(parent: any, newChild: any): void;
|
2017-02-16 16:55:55 -05:00
|
|
|
abstract createComment(value: string): any;
|
2017-03-29 12:34:45 -04:00
|
|
|
abstract createElement(name: string, namespace?: string | null): any;
|
2017-02-16 16:55:55 -05:00
|
|
|
abstract createText(value: string): any;
|
|
|
|
abstract destroy(): void;
|
2017-02-15 00:03:18 -05:00
|
|
|
abstract insertBefore(parent: any, newChild: any, refChild: any): void;
|
2017-03-07 19:36:12 -05:00
|
|
|
abstract listen(target: 'window' | 'document' | 'body' | any, eventName: string, callback: (event: any) => boolean | void): () => void;
|
2017-02-15 00:03:18 -05:00
|
|
|
abstract nextSibling(node: any): any;
|
|
|
|
abstract parentNode(node: any): any;
|
2017-03-29 12:34:45 -04:00
|
|
|
abstract removeAttribute(el: any, name: string, namespace?: string | null): void;
|
2017-02-15 00:03:18 -05:00
|
|
|
abstract removeChild(parent: any, oldChild: any): void;
|
|
|
|
abstract removeClass(el: any, name: string): void;
|
2017-03-13 12:45:04 -04:00
|
|
|
abstract removeStyle(el: any, style: string, flags?: RendererStyleFlags2): void;
|
2017-02-16 16:55:55 -05:00
|
|
|
abstract selectRootElement(selectorOrNode: string | any): any;
|
2017-03-29 12:34:45 -04:00
|
|
|
abstract setAttribute(el: any, name: string, value: string, namespace?: string | null): void;
|
2017-02-15 00:03:18 -05:00
|
|
|
abstract setProperty(el: any, name: string, value: any): void;
|
2017-03-13 12:45:04 -04:00
|
|
|
abstract setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2): void;
|
2017-02-16 16:55:55 -05:00
|
|
|
abstract setValue(node: any, value: string): void;
|
2017-02-15 00:03:18 -05:00
|
|
|
}
|
|
|
|
|
2017-03-07 19:36:12 -05:00
|
|
|
/** @experimental */
|
|
|
|
export declare abstract class RendererFactory2 {
|
2017-05-03 16:17:46 -04:00
|
|
|
abstract begin?(): void;
|
2017-03-29 12:34:45 -04:00
|
|
|
abstract createRenderer(hostElement: any, type: RendererType2 | null): Renderer2;
|
2017-05-03 16:17:46 -04:00
|
|
|
abstract end?(): void;
|
2017-05-12 17:32:51 -04:00
|
|
|
abstract whenRenderingDone?(): Promise<any>;
|
2017-03-07 19:36:12 -05:00
|
|
|
}
|
|
|
|
|
2017-03-13 12:45:04 -04:00
|
|
|
/** @experimental */
|
|
|
|
export declare enum RendererStyleFlags2 {
|
|
|
|
Important = 1,
|
|
|
|
DashCase = 2,
|
|
|
|
}
|
|
|
|
|
2017-03-07 19:36:12 -05:00
|
|
|
/** @experimental */
|
|
|
|
export interface RendererType2 {
|
|
|
|
data: {
|
|
|
|
[kind: string]: any;
|
|
|
|
};
|
|
|
|
encapsulation: ViewEncapsulation;
|
|
|
|
id: string;
|
|
|
|
styles: (string | any[])[];
|
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class ResolvedReflectiveFactory {
|
|
|
|
dependencies: ReflectiveDependency[];
|
2016-06-23 21:19:32 -04:00
|
|
|
factory: Function;
|
2016-06-22 17:56:10 -04:00
|
|
|
constructor(
|
|
|
|
factory: Function,
|
|
|
|
dependencies: ReflectiveDependency[]);
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export interface ResolvedReflectiveProvider {
|
|
|
|
key: ReflectiveKey;
|
|
|
|
multiProvider: boolean;
|
2016-06-23 21:19:32 -04:00
|
|
|
resolvedFactories: ResolvedReflectiveFactory[];
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare function resolveForwardRef(type: any): any;
|
|
|
|
|
2017-02-20 11:00:31 -05:00
|
|
|
/** @deprecated */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare abstract class RootRenderer {
|
|
|
|
abstract renderComponent(componentType: RenderComponentType): Renderer;
|
|
|
|
}
|
|
|
|
|
feat(browser): use AppModules for bootstrap in the browser
This introduces the `BrowserModule` to be used for long form
bootstrap and offline compile bootstrap:
```
@AppModule({
modules: [BrowserModule],
precompile: [MainComponent],
providers: […], // additional providers
directives: […], // additional platform directives
pipes: […] // additional platform pipes
})
class MyModule {
constructor(appRef: ApplicationRef) {
appRef.bootstrap(MainComponent);
}
}
// offline compile
import {bootstrapModuleFactory} from ‘@angular/platform-browser’;
bootstrapModuleFactory(MyModuleNgFactory);
// runtime compile long form
import {bootstrapModule} from ‘@angular/platform-browser-dynamic’;
bootstrapModule(MyModule);
```
The short form, `bootstrap(...)`, can now creates a module on the fly,
given `directives`, `pipes, `providers`, `precompile` and `modules`
properties.
Related changes:
- make `SanitizationService`, `SecurityContext` public in `@angular/core` so that the offline compiler can resolve the token
- move `AnimationDriver` to `platform-browser` and make it
public so that the offline compiler can resolve the token
BREAKING CHANGES:
- short form bootstrap does no longer allow
to inject compiler internals (i.e. everything
from `@angular/compiler). Inject `Compiler` instead.
To provide custom providers for the compiler,
create a custom compiler via `browserCompiler({providers: [...]})`
and pass that into the `bootstrap` method.
2016-06-30 16:07:17 -04:00
|
|
|
/** @stable */
|
2016-08-25 18:41:19 -04:00
|
|
|
export declare abstract class Sanitizer {
|
2017-04-14 17:40:56 -04:00
|
|
|
abstract sanitize(context: SecurityContext, value: {} | string | null): string | null;
|
feat(browser): use AppModules for bootstrap in the browser
This introduces the `BrowserModule` to be used for long form
bootstrap and offline compile bootstrap:
```
@AppModule({
modules: [BrowserModule],
precompile: [MainComponent],
providers: […], // additional providers
directives: […], // additional platform directives
pipes: […] // additional platform pipes
})
class MyModule {
constructor(appRef: ApplicationRef) {
appRef.bootstrap(MainComponent);
}
}
// offline compile
import {bootstrapModuleFactory} from ‘@angular/platform-browser’;
bootstrapModuleFactory(MyModuleNgFactory);
// runtime compile long form
import {bootstrapModule} from ‘@angular/platform-browser-dynamic’;
bootstrapModule(MyModule);
```
The short form, `bootstrap(...)`, can now creates a module on the fly,
given `directives`, `pipes, `providers`, `precompile` and `modules`
properties.
Related changes:
- make `SanitizationService`, `SecurityContext` public in `@angular/core` so that the offline compiler can resolve the token
- move `AnimationDriver` to `platform-browser` and make it
public so that the offline compiler can resolve the token
BREAKING CHANGES:
- short form bootstrap does no longer allow
to inject compiler internals (i.e. everything
from `@angular/compiler). Inject `Compiler` instead.
To provide custom providers for the compiler,
create a custom compiler via `browserCompiler({providers: [...]})`
and pass that into the `bootstrap` method.
2016-06-30 16:07:17 -04:00
|
|
|
}
|
|
|
|
|
2016-07-25 08:47:16 -04:00
|
|
|
/** @experimental */
|
|
|
|
export interface SchemaMetadata {
|
|
|
|
name: string;
|
|
|
|
}
|
|
|
|
|
feat(browser): use AppModules for bootstrap in the browser
This introduces the `BrowserModule` to be used for long form
bootstrap and offline compile bootstrap:
```
@AppModule({
modules: [BrowserModule],
precompile: [MainComponent],
providers: […], // additional providers
directives: […], // additional platform directives
pipes: […] // additional platform pipes
})
class MyModule {
constructor(appRef: ApplicationRef) {
appRef.bootstrap(MainComponent);
}
}
// offline compile
import {bootstrapModuleFactory} from ‘@angular/platform-browser’;
bootstrapModuleFactory(MyModuleNgFactory);
// runtime compile long form
import {bootstrapModule} from ‘@angular/platform-browser-dynamic’;
bootstrapModule(MyModule);
```
The short form, `bootstrap(...)`, can now creates a module on the fly,
given `directives`, `pipes, `providers`, `precompile` and `modules`
properties.
Related changes:
- make `SanitizationService`, `SecurityContext` public in `@angular/core` so that the offline compiler can resolve the token
- move `AnimationDriver` to `platform-browser` and make it
public so that the offline compiler can resolve the token
BREAKING CHANGES:
- short form bootstrap does no longer allow
to inject compiler internals (i.e. everything
from `@angular/compiler). Inject `Compiler` instead.
To provide custom providers for the compiler,
create a custom compiler via `browserCompiler({providers: [...]})`
and pass that into the `bootstrap` method.
2016-06-30 16:07:17 -04:00
|
|
|
/** @stable */
|
|
|
|
export declare enum SecurityContext {
|
|
|
|
NONE = 0,
|
|
|
|
HTML = 1,
|
|
|
|
STYLE = 2,
|
|
|
|
SCRIPT = 3,
|
|
|
|
URL = 4,
|
|
|
|
RESOURCE_URL = 5,
|
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-09-12 22:34:14 -04:00
|
|
|
export declare const Self: SelfDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-09-12 22:34:14 -04:00
|
|
|
export interface SelfDecorator {
|
|
|
|
/** @stable */ (): any;
|
|
|
|
new (): Self;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2017-02-21 12:48:09 -05:00
|
|
|
/** @deprecated */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare function sequence(steps: AnimationMetadata[]): AnimationSequenceMetadata;
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare function setTestabilityGetter(getter: GetTestability): void;
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class SimpleChange {
|
|
|
|
currentValue: any;
|
2017-01-03 14:58:49 -05:00
|
|
|
firstChange: boolean;
|
2016-06-23 21:19:32 -04:00
|
|
|
previousValue: any;
|
2017-01-03 14:58:49 -05:00
|
|
|
constructor(previousValue: any, currentValue: any, firstChange: boolean);
|
2016-06-22 17:56:10 -04:00
|
|
|
isFirstChange(): boolean;
|
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export interface SimpleChanges {
|
|
|
|
[propName: string]: SimpleChange;
|
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-09-12 22:34:14 -04:00
|
|
|
export declare const SkipSelf: SkipSelfDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-09-12 22:34:14 -04:00
|
|
|
export interface SkipSelfDecorator {
|
|
|
|
/** @stable */ (): any;
|
|
|
|
new (): SkipSelf;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2017-02-21 12:48:09 -05:00
|
|
|
/** @deprecated */
|
|
|
|
export declare function state(name: string, styles: AnimationStyleMetadata): AnimationStateMetadata;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2017-07-27 16:49:33 -04:00
|
|
|
/** @stable */
|
|
|
|
export declare type StaticProvider = ValueProvider | ExistingProvider | StaticClassProvider | ConstructorProvider | FactoryProvider | any[];
|
|
|
|
|
2017-02-21 12:48:09 -05:00
|
|
|
/** @deprecated */
|
|
|
|
export declare function style(tokens: {
|
2016-06-22 17:56:10 -04:00
|
|
|
[key: string]: string | number;
|
2017-02-21 12:48:09 -05:00
|
|
|
} | Array<{
|
2016-06-22 17:56:10 -04:00
|
|
|
[key: string]: string | number;
|
|
|
|
}>): AnimationStyleMetadata;
|
|
|
|
|
2016-07-18 06:50:31 -04:00
|
|
|
/** @experimental */
|
|
|
|
export declare class SystemJsNgModuleLoader implements NgModuleFactoryLoader {
|
2016-08-24 19:54:42 -04:00
|
|
|
constructor(_compiler: Compiler, config?: SystemJsNgModuleLoaderConfig);
|
2016-07-18 06:50:31 -04:00
|
|
|
load(path: string): Promise<NgModuleFactory<any>>;
|
|
|
|
}
|
|
|
|
|
2016-08-24 19:54:42 -04:00
|
|
|
/** @experimental */
|
|
|
|
export declare abstract class SystemJsNgModuleLoaderConfig {
|
|
|
|
factoryPathPrefix: string;
|
|
|
|
factoryPathSuffix: string;
|
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare abstract class TemplateRef<C> {
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly abstract elementRef: ElementRef;
|
2016-06-22 17:56:10 -04:00
|
|
|
abstract createEmbeddedView(context: C): EmbeddedViewRef<C>;
|
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2016-08-29 16:08:28 -04:00
|
|
|
export declare class Testability implements PublicTestability {
|
2016-06-22 17:56:10 -04:00
|
|
|
constructor(_ngZone: NgZone);
|
|
|
|
decreasePendingRequestCount(): number;
|
|
|
|
findProviders(using: any, provider: string, exactMatch: boolean): any[];
|
2016-06-23 21:19:32 -04:00
|
|
|
getPendingRequestCount(): number;
|
|
|
|
increasePendingRequestCount(): number;
|
|
|
|
isStable(): boolean;
|
|
|
|
whenStable(callback: Function): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class TestabilityRegistry {
|
|
|
|
constructor();
|
2017-03-29 12:34:45 -04:00
|
|
|
findTestabilityInTree(elem: Node, findInAncestors?: boolean): Testability | null;
|
2016-06-23 21:19:32 -04:00
|
|
|
getAllRootElements(): any[];
|
|
|
|
getAllTestabilities(): Testability[];
|
2017-03-29 12:34:45 -04:00
|
|
|
getTestability(elem: any): Testability | null;
|
2016-06-23 21:19:32 -04:00
|
|
|
registerApplication(token: any, testability: Testability): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2017-01-25 16:45:06 -05:00
|
|
|
/** @stable */
|
|
|
|
export interface TrackByFunction<T> {
|
|
|
|
(index: number, item: T): any;
|
|
|
|
}
|
|
|
|
|
2017-02-21 12:48:09 -05:00
|
|
|
/** @deprecated */
|
2017-04-26 13:44:28 -04:00
|
|
|
export declare function transition(stateChangeExpr: string, steps: AnimationMetadata | AnimationMetadata[]): AnimationTransitionMetadata;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-08-12 17:45:36 -04:00
|
|
|
/** @experimental */
|
2017-01-03 19:54:46 -05:00
|
|
|
export declare const TRANSLATIONS: InjectionToken<string>;
|
2016-08-12 17:45:36 -04:00
|
|
|
|
|
|
|
/** @experimental */
|
2017-01-03 19:54:46 -05:00
|
|
|
export declare const TRANSLATIONS_FORMAT: InjectionToken<string>;
|
2016-08-12 17:45:36 -04:00
|
|
|
|
2017-02-21 12:48:09 -05:00
|
|
|
/** @deprecated */
|
|
|
|
export declare function trigger(name: string, definitions: AnimationMetadata[]): AnimationTriggerMetadata;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @stable */
|
2016-09-20 17:14:57 -04:00
|
|
|
export declare const Type: FunctionConstructor;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export interface TypeDecorator {
|
2016-06-23 21:19:32 -04:00
|
|
|
(target: Object, propertyKey?: string | symbol, parameterIndex?: number): void;
|
2016-08-10 21:21:28 -04:00
|
|
|
<T extends Type<any>>(type: T): T;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-08-15 22:37:42 -04:00
|
|
|
/** @stable */
|
|
|
|
export interface TypeProvider extends Type<any> {
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @stable */
|
|
|
|
export interface ValueProvider {
|
|
|
|
multi?: boolean;
|
|
|
|
provide: any;
|
|
|
|
useValue: any;
|
|
|
|
}
|
|
|
|
|
2016-11-30 16:52:08 -05:00
|
|
|
/** @stable */
|
|
|
|
export declare class Version {
|
|
|
|
full: string;
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly major: string;
|
|
|
|
readonly minor: string;
|
|
|
|
readonly patch: string;
|
2016-11-30 16:52:08 -05:00
|
|
|
constructor(full: string);
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @stable */
|
|
|
|
export declare const VERSION: Version;
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-09-12 22:34:14 -04:00
|
|
|
export declare const ViewChild: ViewChildDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-09-14 14:51:26 -04:00
|
|
|
/** @stable */
|
|
|
|
export interface ViewChildDecorator {
|
2017-06-12 13:59:29 -04:00
|
|
|
/** @stable */ (selector: Type<any> | Function | string, opts?: {
|
2016-09-14 14:51:26 -04:00
|
|
|
read?: any;
|
|
|
|
}): any;
|
2017-06-12 13:59:29 -04:00
|
|
|
new (selector: Type<any> | Function | string, opts?: {
|
2016-09-14 14:51:26 -04:00
|
|
|
read?: any;
|
|
|
|
}): ViewChild;
|
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-09-12 22:34:14 -04:00
|
|
|
export declare const ViewChildren: ViewChildrenDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-09-14 14:51:26 -04:00
|
|
|
/** @stable */
|
2016-12-27 19:58:33 -05:00
|
|
|
export interface ViewChildrenDecorator {
|
2017-06-12 13:59:29 -04:00
|
|
|
/** @stable */ (selector: Type<any> | Function | string, opts?: {
|
2016-09-14 14:51:26 -04:00
|
|
|
read?: any;
|
|
|
|
}): any;
|
2017-06-12 13:59:29 -04:00
|
|
|
new (selector: Type<any> | Function | string, opts?: {
|
2016-09-14 14:51:26 -04:00
|
|
|
read?: any;
|
|
|
|
}): ViewChildren;
|
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare abstract class ViewContainerRef {
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly abstract element: ElementRef;
|
|
|
|
readonly abstract injector: Injector;
|
|
|
|
readonly abstract length: number;
|
|
|
|
readonly abstract parentInjector: Injector;
|
2016-06-22 17:56:10 -04:00
|
|
|
abstract clear(): void;
|
2017-03-21 11:15:10 -04:00
|
|
|
abstract createComponent<C>(componentFactory: ComponentFactory<C>, index?: number, injector?: Injector, projectableNodes?: any[][], ngModule?: NgModuleRef<any>): ComponentRef<C>;
|
2016-06-23 21:19:32 -04:00
|
|
|
abstract createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number): EmbeddedViewRef<C>;
|
2017-03-29 12:34:45 -04:00
|
|
|
abstract detach(index?: number): ViewRef | null;
|
|
|
|
abstract get(index: number): ViewRef | null;
|
2016-06-22 17:56:10 -04:00
|
|
|
abstract indexOf(viewRef: ViewRef): number;
|
2016-06-23 21:19:32 -04:00
|
|
|
abstract insert(viewRef: ViewRef, index?: number): ViewRef;
|
2016-08-01 14:09:52 -04:00
|
|
|
abstract move(viewRef: ViewRef, currentIndex: number): ViewRef;
|
2016-06-22 17:56:10 -04:00
|
|
|
abstract remove(index?: number): void;
|
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare enum ViewEncapsulation {
|
|
|
|
Emulated = 0,
|
|
|
|
Native = 1,
|
|
|
|
None = 2,
|
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-11-04 17:40:37 -04:00
|
|
|
export declare abstract class ViewRef extends ChangeDetectorRef {
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly abstract destroyed: boolean;
|
2016-11-24 05:32:28 -05:00
|
|
|
abstract destroy(): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
abstract onDestroy(callback: Function): any;
|
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class WrappedValue {
|
|
|
|
wrapped: any;
|
|
|
|
constructor(wrapped: any);
|
|
|
|
static wrap(value: any): WrappedValue;
|
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2016-12-27 17:55:58 -05:00
|
|
|
export declare const wtfCreateScope: (signature: string, flags?: any) => WtfScopeFn;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2016-12-27 17:55:58 -05:00
|
|
|
export declare const wtfEndTimeRange: (range: any) => void;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2016-12-27 17:55:58 -05:00
|
|
|
export declare const wtfLeave: <T>(scope: any, returnValue?: T) => T;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export interface WtfScopeFn {
|
|
|
|
(arg0?: any, arg1?: any): any;
|
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2016-12-27 17:55:58 -05:00
|
|
|
export declare const wtfStartTimeRange: (rangeType: string, action: string) => any;
|