refactor(core): change bootstrap of modules and names of platforms
BREAKING CHANGES: - `browserPlatform`/`browserDynamicPlatform`/... have been deprecated and renamed into `platformBrowser`/`platformBrowserDynamic`/.... - `bootstrapModule` and `bootstrapModuleFactory` have been moved to be members of `PlaformRef`. E.g. `platformBrowserDynamic().bootstrapModule(MyModule)`.
This commit is contained in:
@ -11,7 +11,7 @@
|
||||
* @description
|
||||
* Starting point to import all compiler APIs.
|
||||
*/
|
||||
export {COMPILER_PROVIDERS, CompileDiDependencyMetadata, CompileDirectiveMetadata, CompileFactoryMetadata, CompileIdentifierMetadata, CompileMetadataWithIdentifier, CompilePipeMetadata, CompileProviderMetadata, CompileQueryMetadata, CompileTemplateMetadata, CompileTokenMetadata, CompileTypeMetadata, CompilerConfig, DEFAULT_PACKAGE_URL_PROVIDER, DirectiveResolver, NgModuleResolver, OfflineCompiler, PipeResolver, RenderTypes, RuntimeCompiler, SourceModule, TEMPLATE_TRANSFORMS, UrlResolver, ViewResolver, XHR, analyzeAppProvidersForDeprecatedConfiguration, coreDynamicPlatform, createOfflineCompileUrlResolver} from './src/compiler';
|
||||
export {COMPILER_PROVIDERS, CompileDiDependencyMetadata, CompileDirectiveMetadata, CompileFactoryMetadata, CompileIdentifierMetadata, CompileMetadataWithIdentifier, CompilePipeMetadata, CompileProviderMetadata, CompileQueryMetadata, CompileTemplateMetadata, CompileTokenMetadata, CompileTypeMetadata, CompilerConfig, DEFAULT_PACKAGE_URL_PROVIDER, DirectiveResolver, NgModuleResolver, OfflineCompiler, PipeResolver, RenderTypes, RuntimeCompiler, SourceModule, TEMPLATE_TRANSFORMS, UrlResolver, ViewResolver, XHR, analyzeAppProvidersForDeprecatedConfiguration, createOfflineCompileUrlResolver, platformCoreDynamic} from './src/compiler';
|
||||
export {ElementSchemaRegistry} from './src/schema/element_schema_registry';
|
||||
|
||||
export * from './src/template_ast';
|
||||
|
@ -6,7 +6,7 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {Compiler, CompilerFactory, CompilerOptions, Component, ComponentResolver, Inject, Injectable, NgModule, PLATFORM_DIRECTIVES, PLATFORM_INITIALIZER, PLATFORM_PIPES, PlatformRef, ReflectiveInjector, Type, ViewEncapsulation, corePlatform, createPlatformFactory, disposePlatform, isDevMode} from '@angular/core';
|
||||
import {Compiler, CompilerFactory, CompilerOptions, Component, ComponentResolver, Inject, Injectable, NgModule, PLATFORM_DIRECTIVES, PLATFORM_INITIALIZER, PLATFORM_PIPES, PlatformRef, ReflectiveInjector, Type, ViewEncapsulation, createPlatformFactory, disposePlatform, isDevMode, platformCore} from '@angular/core';
|
||||
|
||||
export * from './template_ast';
|
||||
export {TEMPLATE_TRANSFORMS} from './template_parser';
|
||||
@ -199,7 +199,7 @@ function _initReflector() {
|
||||
*
|
||||
* @experimental
|
||||
*/
|
||||
export const coreDynamicPlatform = createPlatformFactory(corePlatform, 'coreDynamic', [
|
||||
export const platformCoreDynamic = createPlatformFactory(platformCore, 'coreDynamic', [
|
||||
{provide: CompilerOptions, useValue: {}, multi: true},
|
||||
{provide: CompilerFactory, useClass: RuntimeCompilerFactory},
|
||||
{provide: PLATFORM_INITIALIZER, useValue: _initReflector, multi: true},
|
||||
|
@ -13,7 +13,7 @@ export * from './testing/directive_resolver_mock';
|
||||
export * from './testing/ng_module_resolver_mock';
|
||||
|
||||
import {createPlatformFactory, CompilerOptions, PlatformRef} from '@angular/core';
|
||||
import {coreDynamicPlatform, DirectiveResolver, ViewResolver, NgModuleResolver} from './index';
|
||||
import {platformCoreDynamic, DirectiveResolver, ViewResolver, NgModuleResolver} from './index';
|
||||
import {MockViewResolver} from './testing/view_resolver_mock';
|
||||
import {MockDirectiveResolver} from './testing/directive_resolver_mock';
|
||||
import {MockNgModuleResolver} from './testing/ng_module_resolver_mock';
|
||||
@ -24,8 +24,8 @@ import {MockNgModuleResolver} from './testing/ng_module_resolver_mock';
|
||||
*
|
||||
* @experimental
|
||||
*/
|
||||
export const coreDynamicTestingPlatform =
|
||||
createPlatformFactory(coreDynamicPlatform, 'coreDynamicTesting', [{
|
||||
export const platformCoreDynamicTesting =
|
||||
createPlatformFactory(platformCoreDynamic, 'coreDynamicTesting', [{
|
||||
provide: CompilerOptions,
|
||||
useValue: {
|
||||
providers: [
|
||||
|
Reference in New Issue
Block a user