Remove component resolver (#10858)

* refactor(core): remove deprecated ComponentResolver

BREAKING CHANGE: deprecated ComponentResolver was removed

Please follow deprecation instruction and migrate your code to use ComponentFactoryResolver.

* refactor(common): remove deprecated NgSwitchWhen directive

BREAKING CHANGE: previously deprecated NgSwitchWhen directive was removed, use NgSwitchCase instead
This commit is contained in:
Igor Minar
2016-08-16 16:48:32 -07:00
committed by vikerman
parent 9adf80385b
commit 73a9ee4a05
15 changed files with 62 additions and 186 deletions

View File

@ -1,30 +0,0 @@
/**
* @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
*/
import {Type} from '../type';
import {ComponentFactory} from './component_factory';
/**
* Low-level service for loading {@link ComponentFactory}s, which
* can later be used to create and render a Component instance.
*
* @deprecated Use {@link ComponentFactoryResolver} together with {@link
* NgModule}.entryComponents}/{@link Component}.entryComponents or
* {@link ANALYZE_FOR_ENTRY_COMPONENTS} provider for dynamic component creation.
* Use {@link NgModuleFactoryLoader} for lazy loading.
*/
export abstract class ComponentResolver {
static DynamicCompilationDeprecationMsg =
'ComponentResolver is deprecated for dynamic compilation. Use ComponentFactoryResolver together with @NgModule/@Component.entryComponents or ANALYZE_FOR_ENTRY_COMPONENTS provider instead. For runtime compile only, you can also use Compiler.compileComponentSync/Async.';
static LazyLoadingDeprecationMsg =
'ComponentResolver is deprecated for lazy loading. Use NgModuleFactoryLoader instead.';
abstract resolveComponent(component: Type<any>|string): Promise<ComponentFactory<any>>;
abstract clearCache(): void;
}

View File

@ -78,7 +78,7 @@ export abstract class ViewContainerRef {
* specified `index`.
*
* The component is instantiated using its {@link ComponentFactory} which can be
* obtained via {@link ComponentResolver#resolveComponent}.
* obtained via {@link ComponentFactoryResolver#resolveComponentFactory}.
*
* If `index` is not specified, the new View will be inserted as the last View in the container.
*