2016-07-18 06:50:31 -04:00
|
|
|
/**
|
|
|
|
* @license
|
|
|
|
* Copyright Google Inc. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
|
|
* found in the LICENSE file at https://angular.io/license
|
|
|
|
*/
|
|
|
|
|
2016-08-02 10:54:14 -04:00
|
|
|
import {ApplicationInitStatus} from './application_init';
|
2016-08-11 18:24:35 -04:00
|
|
|
import {ApplicationRef, ApplicationRef_} from './application_ref';
|
2016-07-18 06:50:31 -04:00
|
|
|
import {APP_ID_RANDOM_PROVIDER} from './application_tokens';
|
|
|
|
import {IterableDiffers, KeyValueDiffers, defaultIterableDiffers, defaultKeyValueDiffers} from './change_detection/change_detection';
|
|
|
|
import {Compiler} from './linker/compiler';
|
|
|
|
import {ComponentResolver} from './linker/component_resolver';
|
|
|
|
import {DynamicComponentLoader, DynamicComponentLoader_} from './linker/dynamic_component_loader';
|
|
|
|
import {ViewUtils} from './linker/view_utils';
|
|
|
|
import {NgModule} from './metadata';
|
2016-08-10 21:21:28 -04:00
|
|
|
import {Type} from './type';
|
2016-07-18 06:50:31 -04:00
|
|
|
|
|
|
|
export function _iterableDiffersFactory() {
|
|
|
|
return defaultIterableDiffers;
|
|
|
|
}
|
|
|
|
|
|
|
|
export function _keyValueDiffersFactory() {
|
|
|
|
return defaultKeyValueDiffers;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A default set of providers which should be included in any Angular
|
|
|
|
* application, regardless of the platform it runs onto.
|
|
|
|
*
|
|
|
|
* @deprecated Include `ApplicationModule` instead.
|
|
|
|
*/
|
2016-08-10 21:21:28 -04:00
|
|
|
export const APPLICATION_COMMON_PROVIDERS: Array<Type<any>|{[k: string]: any}|any[]> = [];
|
2016-07-18 06:50:31 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This module includes the providers of @angular/core that are needed
|
|
|
|
* to bootstrap components via `ApplicationRef`.
|
|
|
|
*
|
|
|
|
* @experimental
|
|
|
|
*/
|
|
|
|
@NgModule({
|
|
|
|
providers: [
|
|
|
|
ApplicationRef_,
|
|
|
|
{provide: ApplicationRef, useExisting: ApplicationRef_},
|
2016-08-02 10:54:14 -04:00
|
|
|
ApplicationInitStatus,
|
2016-07-18 06:50:31 -04:00
|
|
|
Compiler,
|
|
|
|
{provide: ComponentResolver, useExisting: Compiler},
|
|
|
|
APP_ID_RANDOM_PROVIDER,
|
|
|
|
ViewUtils,
|
|
|
|
{provide: IterableDiffers, useFactory: _iterableDiffersFactory},
|
|
|
|
{provide: KeyValueDiffers, useFactory: _keyValueDiffersFactory},
|
|
|
|
{provide: DynamicComponentLoader, useClass: DynamicComponentLoader_},
|
|
|
|
]
|
|
|
|
})
|
|
|
|
export class ApplicationModule {
|
|
|
|
}
|