2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare abstract class AfterContentChecked {
|
2016-07-16 14:05:44 -04:00
|
|
|
abstract ngAfterContentChecked(): void;
|
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 AfterContentInit {
|
2016-07-16 14:05:44 -04:00
|
|
|
abstract ngAfterContentInit(): void;
|
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 AfterViewChecked {
|
2016-07-16 14:05:44 -04:00
|
|
|
abstract ngAfterViewChecked(): void;
|
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 AfterViewInit {
|
2016-07-16 14:05:44 -04:00
|
|
|
abstract ngAfterViewInit(): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-07-07 13:05:55 -04:00
|
|
|
/** @experimental */
|
2016-07-25 08:47:16 -04:00
|
|
|
export declare const ANALYZE_FOR_ENTRY_COMPONENTS: OpaqueToken;
|
2016-07-07 13:05:55 -04:00
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare function animate(timing: string | number, styles?: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata): AnimationAnimateMetadata;
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class AnimationAnimateMetadata extends AnimationMetadata {
|
|
|
|
styles: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata;
|
2016-06-23 21:19:32 -04:00
|
|
|
timings: string | number;
|
2016-06-22 17:56:10 -04:00
|
|
|
constructor(timings: string | number, styles: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata);
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class AnimationEntryMetadata {
|
|
|
|
definitions: AnimationStateMetadata[];
|
2016-06-23 21:19:32 -04:00
|
|
|
name: string;
|
2016-06-22 17:56:10 -04:00
|
|
|
constructor(name: string, definitions: AnimationStateMetadata[]);
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class AnimationGroupMetadata extends AnimationWithStepsMetadata {
|
|
|
|
steps: AnimationMetadata[];
|
2016-06-23 21:19:32 -04:00
|
|
|
constructor(_steps: AnimationMetadata[]);
|
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 class AnimationKeyframesSequenceMetadata extends AnimationMetadata {
|
|
|
|
steps: AnimationStyleMetadata[];
|
|
|
|
constructor(steps: AnimationStyleMetadata[]);
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare abstract class AnimationMetadata {
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare abstract class AnimationPlayer {
|
2016-06-23 21:19:32 -04:00
|
|
|
parentPlayer: AnimationPlayer;
|
|
|
|
abstract destroy(): void;
|
|
|
|
abstract finish(): void;
|
|
|
|
abstract getPosition(): number;
|
2016-07-01 19:01:57 -04:00
|
|
|
abstract hasStarted(): boolean;
|
|
|
|
abstract init(): void;
|
2016-08-22 19:39:52 -04:00
|
|
|
abstract onDone(fn: () => void): void;
|
|
|
|
abstract onStart(fn: () => void): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
abstract pause(): void;
|
2016-06-23 21:19:32 -04:00
|
|
|
abstract play(): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
abstract reset(): void;
|
2016-06-23 21:19:32 -04:00
|
|
|
abstract restart(): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
abstract setPosition(p: any): void;
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class AnimationSequenceMetadata extends AnimationWithStepsMetadata {
|
|
|
|
steps: AnimationMetadata[];
|
2016-06-23 21:19:32 -04:00
|
|
|
constructor(_steps: AnimationMetadata[]);
|
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 class AnimationStateDeclarationMetadata extends AnimationStateMetadata {
|
|
|
|
stateNameExpr: string;
|
|
|
|
styles: AnimationStyleMetadata;
|
|
|
|
constructor(stateNameExpr: string, styles: AnimationStyleMetadata);
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare abstract class AnimationStateMetadata {
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class AnimationStateTransitionMetadata extends AnimationStateMetadata {
|
|
|
|
stateChangeExpr: string;
|
|
|
|
steps: AnimationMetadata;
|
|
|
|
constructor(stateChangeExpr: string, steps: AnimationMetadata);
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class AnimationStyleMetadata extends AnimationMetadata {
|
2016-06-23 21:19:32 -04:00
|
|
|
offset: number;
|
2016-06-22 17:56:10 -04:00
|
|
|
styles: Array<string | {
|
|
|
|
[key: string]: string | number;
|
|
|
|
}>;
|
|
|
|
constructor(styles: Array<string | {
|
|
|
|
[key: string]: string | number;
|
|
|
|
}>, offset?: number);
|
|
|
|
}
|
|
|
|
|
2016-08-24 19:55:00 -04:00
|
|
|
/** @experimental */
|
|
|
|
export declare class AnimationTransitionEvent {
|
|
|
|
fromState: string;
|
|
|
|
toState: string;
|
|
|
|
totalTime: number;
|
|
|
|
constructor({fromState, toState, totalTime}: {
|
|
|
|
fromState: string;
|
|
|
|
toState: string;
|
|
|
|
totalTime: number;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare abstract class AnimationWithStepsMetadata extends AnimationMetadata {
|
|
|
|
steps: AnimationMetadata[];
|
2016-06-23 21:19:32 -04:00
|
|
|
constructor();
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-08-02 10:54:14 -04:00
|
|
|
/** @experimental */
|
|
|
|
export declare const APP_BOOTSTRAP_LISTENER: OpaqueToken;
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare const APP_ID: any;
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare const APP_INITIALIZER: any;
|
|
|
|
|
2016-08-02 10:54:14 -04:00
|
|
|
/** @experimental */
|
|
|
|
export declare class ApplicationInitStatus {
|
|
|
|
done: boolean;
|
|
|
|
donePromise: Promise<any>;
|
|
|
|
constructor(appInits: (() => any)[]);
|
|
|
|
}
|
|
|
|
|
2016-07-18 06:50:31 -04:00
|
|
|
/** @experimental */
|
|
|
|
export declare class ApplicationModule {
|
|
|
|
}
|
|
|
|
|
2016-08-24 01:29:34 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare abstract class ApplicationRef {
|
2016-08-10 21:21:28 -04:00
|
|
|
componentTypes: Type<any>[];
|
2016-08-02 10:54:14 -04:00
|
|
|
components: ComponentRef<any>[];
|
2016-08-10 21:21:28 -04:00
|
|
|
abstract bootstrap<C>(componentFactory: ComponentFactory<C> | Type<C>): ComponentRef<C>;
|
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
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare const AUTO_STYLE: string;
|
|
|
|
|
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-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-08-10 21:21:28 -04:00
|
|
|
export declare function Class(clsDef: ClassDefinition): Type<any>;
|
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 ClassDefinition {
|
|
|
|
constructor: Function | any[];
|
2016-08-10 21:21:28 -04:00
|
|
|
extends?: Type<any>;
|
|
|
|
[x: string]: Type<any> | Function | any[];
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-08-15 22:37:42 -04:00
|
|
|
/** @stable */
|
|
|
|
export interface ClassProvider {
|
|
|
|
multi?: boolean;
|
|
|
|
provide: any;
|
|
|
|
useClass: Type<any>;
|
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class CollectionChangeRecord {
|
|
|
|
currentIndex: number;
|
2016-06-23 21:19:32 -04:00
|
|
|
item: any;
|
2016-06-22 17:56:10 -04:00
|
|
|
previousIndex: number;
|
2016-06-23 21:19:32 -04:00
|
|
|
trackById: any;
|
2016-06-22 17:56:10 -04:00
|
|
|
constructor(item: any, trackById: any);
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
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>;
|
2016-06-24 11:46:43 -04:00
|
|
|
}
|
|
|
|
|
2016-08-04 14:31:58 -04:00
|
|
|
/** @experimental */
|
|
|
|
export declare const COMPILER_OPTIONS: OpaqueToken;
|
|
|
|
|
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 = {
|
|
|
|
useDebug?: boolean;
|
|
|
|
useJit?: boolean;
|
|
|
|
defaultEncapsulation?: ViewEncapsulation;
|
|
|
|
providers?: any[];
|
|
|
|
};
|
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-06-27 15:27:23 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class ComponentFactory<C> {
|
2016-08-10 21:21:28 -04:00
|
|
|
componentType: Type<any>;
|
2016-06-22 17:56:10 -04:00
|
|
|
selector: string;
|
2016-08-10 21:21:28 -04:00
|
|
|
constructor(selector: string, _viewFactory: Function, _componentType: Type<any>);
|
2016-06-22 17:56:10 -04:00
|
|
|
create(injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string | any): ComponentRef<C>;
|
|
|
|
}
|
|
|
|
|
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> {
|
|
|
|
changeDetectorRef: ChangeDetectorRef;
|
2016-08-10 21:21:28 -04:00
|
|
|
componentType: Type<any>;
|
2016-06-23 21:19:32 -04:00
|
|
|
hostView: ViewRef;
|
|
|
|
injector: Injector;
|
|
|
|
instance: C;
|
|
|
|
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 {
|
|
|
|
(selector: Type<any> | Function | string, {read}?: {
|
|
|
|
read?: any;
|
|
|
|
}): any;
|
|
|
|
new (selector: Type<any> | Function | string, {read}?: {
|
|
|
|
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 {
|
|
|
|
/** @stable */ (selector: Type<any> | Function | string, {descendants, read}?: {
|
|
|
|
descendants?: boolean;
|
|
|
|
read?: any;
|
|
|
|
}): any;
|
|
|
|
new (selector: Type<any> | Function | string, {descendants, read}?: {
|
|
|
|
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 */
|
2016-08-30 21:07:40 -04:00
|
|
|
export declare function createPlatformFactory(parentPlaformFactory: (extraProviders?: Provider[]) => PlatformRef, name: string, providers?: Provider[]): (extraProviders?: Provider[]) => 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: {
|
|
|
|
[key: string]: string;
|
|
|
|
};
|
2016-06-23 21:19:32 -04:00
|
|
|
childNodes: DebugNode[];
|
|
|
|
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: {
|
|
|
|
[key: string]: string;
|
|
|
|
};
|
|
|
|
constructor(nativeNode: any, parent: any, _debugInfo: RenderDebugInfo);
|
|
|
|
addChild(child: DebugNode): void;
|
|
|
|
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 {
|
|
|
|
componentInstance: any;
|
|
|
|
context: any;
|
2016-06-23 21:19:32 -04:00
|
|
|
injector: Injector;
|
|
|
|
listeners: EventListener[];
|
|
|
|
nativeNode: any;
|
|
|
|
parent: DebugElement;
|
|
|
|
providerTokens: any[];
|
2016-06-22 17:56:10 -04:00
|
|
|
references: {
|
|
|
|
[key: string]: any;
|
|
|
|
};
|
|
|
|
source: string;
|
2016-06-23 21:19:32 -04:00
|
|
|
constructor(nativeNode: any, parent: DebugNode, _debugInfo: RenderDebugInfo);
|
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 DefaultIterableDiffer implements IterableDiffer {
|
|
|
|
collection: any;
|
2016-06-23 21:19:32 -04:00
|
|
|
isDirty: boolean;
|
2016-06-22 17:56:10 -04:00
|
|
|
length: number;
|
2016-06-23 21:19:32 -04:00
|
|
|
constructor(_trackByFn?: TrackByFn);
|
|
|
|
check(collection: any): boolean;
|
|
|
|
diff(collection: any): DefaultIterableDiffer;
|
2016-06-22 17:56:10 -04:00
|
|
|
forEachAddedItem(fn: Function): void;
|
2016-06-23 21:19:32 -04:00
|
|
|
forEachIdentityChange(fn: Function): void;
|
|
|
|
forEachItem(fn: Function): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
forEachMovedItem(fn: Function): void;
|
2016-08-01 14:09:52 -04:00
|
|
|
forEachOperation(fn: (item: CollectionChangeRecord, previousIndex: number, currentIndex: number) => void): void;
|
2016-06-23 21:19:32 -04:00
|
|
|
forEachPreviousItem(fn: Function): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
forEachRemovedItem(fn: Function): void;
|
|
|
|
onDestroy(): void;
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
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-06-22 17:56:10 -04:00
|
|
|
export declare abstract class DoCheck {
|
2016-07-16 14:05:44 -04:00
|
|
|
abstract 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 {
|
|
|
|
context: C;
|
|
|
|
rootNodes: any[];
|
2016-07-13 14:01:32 -04:00
|
|
|
abstract destroy(): void;
|
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 {
|
|
|
|
constructor(rethrowError?: boolean);
|
|
|
|
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 */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare function getDebugNode(nativeNode: any): DebugNode;
|
|
|
|
|
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 */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare function getPlatform(): PlatformRef;
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export interface GetTestability {
|
|
|
|
addToWindow(registry: TestabilityRegistry): void;
|
|
|
|
findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean): Testability;
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
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
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare abstract class Injector {
|
|
|
|
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;
|
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-06-22 17:56:10 -04:00
|
|
|
export interface IterableDiffer {
|
|
|
|
diff(object: any): any;
|
|
|
|
onDestroy(): any;
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export interface IterableDifferFactory {
|
|
|
|
create(cdRef: ChangeDetectorRef, trackByFn?: TrackByFn): IterableDiffer;
|
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 {
|
|
|
|
factories: IterableDifferFactory[];
|
|
|
|
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;
|
|
|
|
static extend(factories: IterableDifferFactory[]): Provider;
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
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-06-22 17:56:10 -04:00
|
|
|
export declare class KeyValueChangeRecord {
|
2016-06-23 21:19:32 -04:00
|
|
|
currentValue: any;
|
2016-06-22 17:56:10 -04:00
|
|
|
key: any;
|
|
|
|
previousValue: any;
|
|
|
|
constructor(key: any);
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export interface KeyValueDiffer {
|
|
|
|
diff(object: any): any;
|
|
|
|
onDestroy(): any;
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export interface KeyValueDifferFactory {
|
|
|
|
create(cdRef: ChangeDetectorRef): KeyValueDiffer;
|
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 {
|
|
|
|
factories: KeyValueDifferFactory[];
|
|
|
|
constructor(factories: KeyValueDifferFactory[]);
|
2016-06-23 21:19:32 -04:00
|
|
|
find(kv: Object): KeyValueDifferFactory;
|
2016-06-22 17:56:10 -04:00
|
|
|
static create(factories: KeyValueDifferFactory[], parent?: KeyValueDiffers): KeyValueDiffers;
|
|
|
|
static extend(factories: KeyValueDifferFactory[]): Provider;
|
|
|
|
}
|
|
|
|
|
2016-08-12 17:45:36 -04:00
|
|
|
/** @experimental */
|
|
|
|
export declare const LOCALE_ID: OpaqueToken;
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
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 */
|
|
|
|
export declare class NgModuleFactory<T> {
|
2016-08-10 21:21:28 -04:00
|
|
|
moduleType: Type<T>;
|
2016-07-18 06:50:31 -04:00
|
|
|
constructor(_injectorClass: {
|
|
|
|
new (parentInjector: Injector): NgModuleInjector<T>;
|
2016-08-19 16:50:15 -04:00
|
|
|
}, _moduleType: Type<T>);
|
2016-07-18 06:50:31 -04:00
|
|
|
create(parentInjector: Injector): NgModuleRef<T>;
|
|
|
|
}
|
|
|
|
|
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> {
|
|
|
|
componentFactoryResolver: ComponentFactoryResolver;
|
|
|
|
injector: Injector;
|
|
|
|
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-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class NgZone {
|
2016-06-23 21:19:32 -04:00
|
|
|
hasPendingMacrotasks: boolean;
|
|
|
|
hasPendingMicrotasks: boolean;
|
|
|
|
isStable: boolean;
|
|
|
|
onError: EventEmitter<any>;
|
|
|
|
onMicrotaskEmpty: EventEmitter<any>;
|
|
|
|
onStable: EventEmitter<any>;
|
|
|
|
onUnstable: EventEmitter<any>;
|
2016-06-22 17:56:10 -04:00
|
|
|
constructor({enableLongStackTrace}: {
|
|
|
|
enableLongStackTrace?: boolean;
|
|
|
|
});
|
|
|
|
run(fn: () => any): any;
|
|
|
|
runGuarded(fn: () => any): any;
|
|
|
|
runOutsideAngular(fn: () => any): any;
|
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 */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare abstract class OnChanges {
|
2016-07-16 14:05:44 -04:00
|
|
|
abstract ngOnChanges(changes: SimpleChanges): void;
|
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 OnDestroy {
|
2016-07-16 14:05:44 -04:00
|
|
|
abstract ngOnDestroy(): void;
|
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 OnInit {
|
2016-07-16 14:05:44 -04:00
|
|
|
abstract ngOnInit(): void;
|
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 OpaqueToken {
|
|
|
|
constructor(_desc: string);
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
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 */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare const PACKAGE_ROOT_URL: any;
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare const PLATFORM_INITIALIZER: any;
|
|
|
|
|
2016-07-25 08:47:16 -04:00
|
|
|
/** @experimental */
|
2016-08-30 21:07:40 -04:00
|
|
|
export declare const platformCore: (extraProviders?: Provider[]) => 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 {
|
2016-08-02 10:54:14 -04:00
|
|
|
destroyed: boolean;
|
2016-06-22 17:56:10 -04:00
|
|
|
injector: Injector;
|
2016-08-10 21:21:28 -04:00
|
|
|
/** @stable */ bootstrapModule<M>(moduleType: Type<M>, compilerOptions?: CompilerOptions | CompilerOptions[]): Promise<NgModuleRef<M>>;
|
2016-07-29 09:47:40 -04:00
|
|
|
/** @experimental */ 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
|
|
|
}
|
|
|
|
|
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> {
|
|
|
|
changes: Observable<any>;
|
2016-06-23 21:19:32 -04:00
|
|
|
dirty: boolean;
|
2016-06-22 17:56:10 -04:00
|
|
|
first: T;
|
|
|
|
last: T;
|
2016-06-23 21:19:32 -04:00
|
|
|
length: number;
|
2016-06-22 17:56:10 -04:00
|
|
|
filter(fn: (item: T, index: number, array: T[]) => boolean): T[];
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare abstract class ReflectiveInjector implements Injector {
|
2016-06-23 21:19:32 -04:00
|
|
|
parent: Injector;
|
|
|
|
createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector;
|
|
|
|
abstract get(token: any, notFoundValue?: any): any;
|
|
|
|
instantiateResolved(provider: ResolvedReflectiveProvider): any;
|
2016-08-15 22:37:42 -04:00
|
|
|
resolveAndCreateChild(providers: Provider[]): ReflectiveInjector;
|
|
|
|
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
|
|
|
}
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class ReflectiveKey {
|
2016-06-23 21:19:32 -04:00
|
|
|
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);
|
|
|
|
static numberOfKeys: number;
|
2016-06-23 21:19:32 -04:00
|
|
|
static get(token: Object): ReflectiveKey;
|
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 RenderComponentType {
|
2016-07-08 20:11:12 -04:00
|
|
|
animations: {
|
|
|
|
[key: string]: Function;
|
|
|
|
};
|
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;
|
2016-07-08 20:11:12 -04:00
|
|
|
constructor(id: string, templateUrl: string, slotCount: number, encapsulation: ViewEncapsulation, styles: Array<string | any[]>, animations: {
|
|
|
|
[key: string]: Function;
|
|
|
|
});
|
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 abstract class Renderer {
|
2016-06-23 21:19:32 -04:00
|
|
|
abstract animate(element: any, startingStyles: AnimationStyles, keyframes: AnimationKeyframe[], duration: number, delay: number, easing: string): AnimationPlayer;
|
|
|
|
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
|
|
|
}
|
|
|
|
|
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;
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
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 {
|
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
|
|
|
abstract sanitize(context: SecurityContext, value: string): string;
|
|
|
|
}
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
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;
|
2016-06-23 21:19:32 -04:00
|
|
|
previousValue: any;
|
2016-06-22 17:56:10 -04:00
|
|
|
constructor(previousValue: any, currentValue: any);
|
|
|
|
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
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare function state(stateNameExpr: string, styles: AnimationStyleMetadata): AnimationStateDeclarationMetadata;
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare function style(tokens: string | {
|
|
|
|
[key: string]: string | number;
|
|
|
|
} | Array<string | {
|
|
|
|
[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> {
|
|
|
|
elementRef: ElementRef;
|
|
|
|
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;
|
|
|
|
findBindings(using: any, provider: string, exactMatch: boolean): any[];
|
|
|
|
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();
|
|
|
|
findTestabilityInTree(elem: Node, findInAncestors?: boolean): Testability;
|
2016-06-23 21:19:32 -04:00
|
|
|
getAllRootElements(): any[];
|
|
|
|
getAllTestabilities(): Testability[];
|
|
|
|
getTestability(elem: any): Testability;
|
|
|
|
registerApplication(token: any, testability: Testability): 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 interface TrackByFn {
|
|
|
|
(index: number, item: any): any;
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare function transition(stateChangeExpr: string, steps: AnimationMetadata | AnimationMetadata[]): AnimationStateTransitionMetadata;
|
|
|
|
|
2016-08-12 17:45:36 -04:00
|
|
|
/** @experimental */
|
|
|
|
export declare const TRANSLATIONS: OpaqueToken;
|
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export declare const TRANSLATIONS_FORMAT: OpaqueToken;
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare function trigger(name: string, animation: AnimationMetadata[]): AnimationEntryMetadata;
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare var Type: FunctionConstructor;
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export interface TypeDecorator {
|
|
|
|
annotations: any[];
|
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;
|
|
|
|
Class(obj: ClassDefinition): Type<any>;
|
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-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 {
|
|
|
|
/** @stable */ (selector: Type<any> | Function | string, {read}?: {
|
|
|
|
read?: any;
|
|
|
|
}): any;
|
|
|
|
new (selector: Type<any> | Function | string, {read}?: {
|
|
|
|
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 */
|
|
|
|
export interface ViewChildrenDecorator { (selector: Type<any> | Function | string, {read}?: {
|
|
|
|
read?: any;
|
|
|
|
}): any;
|
|
|
|
new (selector: Type<any> | Function | string, {read}?: {
|
|
|
|
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 {
|
|
|
|
element: ElementRef;
|
|
|
|
injector: Injector;
|
2016-06-23 21:19:32 -04:00
|
|
|
length: number;
|
2016-06-22 17:56:10 -04:00
|
|
|
parentInjector: Injector;
|
|
|
|
abstract clear(): void;
|
|
|
|
abstract createComponent<C>(componentFactory: ComponentFactory<C>, index?: number, injector?: Injector, projectableNodes?: any[][]): ComponentRef<C>;
|
2016-06-23 21:19:32 -04:00
|
|
|
abstract createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number): EmbeddedViewRef<C>;
|
|
|
|
abstract detach(index?: number): ViewRef;
|
|
|
|
abstract get(index: number): ViewRef;
|
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-06-22 17:56:10 -04:00
|
|
|
export declare abstract class ViewRef {
|
|
|
|
destroyed: boolean;
|
|
|
|
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-06-22 17:56:10 -04:00
|
|
|
export declare var wtfCreateScope: (signature: string, flags?: any) => WtfScopeFn;
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare var wtfEndTimeRange: (range: any) => void;
|
|
|
|
|
2016-06-27 13:02:02 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare var wtfLeave: <T>(scope: any, returnValue?: T) => T;
|
|
|
|
|
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-06-22 17:56:10 -04:00
|
|
|
export declare var wtfStartTimeRange: (rangeType: string, action: string) => any;
|