diff --git a/modules/@angular/core/src/linker.ts b/modules/@angular/core/src/linker.ts index 020059bb76..3cc5ebb1f5 100644 --- a/modules/@angular/core/src/linker.ts +++ b/modules/@angular/core/src/linker.ts @@ -18,7 +18,6 @@ export {NgModuleFactory, NgModuleRef} from './linker/ng_module_factory'; export {NgModuleFactoryLoader} from './linker/ng_module_factory_loader'; export {QueryList} from './linker/query_list'; export {SystemJsNgModuleLoader} from './linker/system_js_ng_module_factory_loader'; -export {SystemJsCmpFactoryResolver, SystemJsComponentResolver} from './linker/systemjs_component_resolver'; export {TemplateRef} from './linker/template_ref'; export {ViewContainerRef} from './linker/view_container_ref'; export {EmbeddedViewRef, ViewRef} from './linker/view_ref'; diff --git a/modules/@angular/core/src/linker/systemjs_component_resolver.ts b/modules/@angular/core/src/linker/systemjs_component_resolver.ts deleted file mode 100644 index e470e5a37f..0000000000 --- a/modules/@angular/core/src/linker/systemjs_component_resolver.ts +++ /dev/null @@ -1,74 +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 {Console} from '../console'; -import {Injectable} from '../di'; -import {isString} from '../facade/lang'; -import {Type} from '../type'; -import {ComponentFactory} from './component_factory'; -import {ComponentResolver} from './component_resolver'; - -const _SEPARATOR = '#'; - -/** - * Component resolver that can load components lazily - * - * @deprecated Lazy loading of components is deprecated. Use {@link SystemJsNgModuleLoader} to lazy - * load - * {@link NgModuleFactory}s instead. - */ -@Injectable() -export class SystemJsComponentResolver implements ComponentResolver { - constructor(private _resolver: ComponentResolver, private _console: Console) {} - - resolveComponent(componentType: string|Type): Promise> { - if (isString(componentType)) { - this._console.warn(ComponentResolver.LazyLoadingDeprecationMsg); - let [module, component] = componentType.split(_SEPARATOR); - - if (component === void(0)) { - // Use the default export when no component is specified - component = 'default'; - } - - return System.import(module).then( - (module: any) => this._resolver.resolveComponent(module[component])); - } - - return this._resolver.resolveComponent(componentType); - } - - clearCache(): void {} -} - -const FACTORY_MODULE_SUFFIX = '.ngfactory'; -const FACTORY_CLASS_SUFFIX = 'NgFactory'; - -/** - * Component resolver that can load component factories lazily - * - * @deprecated Lazy loading of components is deprecated. Use {@link SystemJsNgModuleLoader} - * to lazy - * load {@link NgModuleFactory}s instead. - */ -@Injectable() -export class SystemJsCmpFactoryResolver implements ComponentResolver { - constructor(private _console: Console) {} - resolveComponent(componentType: string|Type): Promise> { - if (isString(componentType)) { - this._console.warn(ComponentResolver.LazyLoadingDeprecationMsg); - let [module, factory] = componentType.split(_SEPARATOR); - return System.import(module + FACTORY_MODULE_SUFFIX) - .then((module: any) => module[factory + FACTORY_CLASS_SUFFIX]); - } - - return Promise.resolve(null); - } - - clearCache(): void {} -} diff --git a/tools/public_api_guard/core/index.d.ts b/tools/public_api_guard/core/index.d.ts index 0420ed707e..efd00009b2 100644 --- a/tools/public_api_guard/core/index.d.ts +++ b/tools/public_api_guard/core/index.d.ts @@ -1243,20 +1243,6 @@ export declare function style(tokens: string | { [key: string]: string | number; }>): AnimationStyleMetadata; -/** @deprecated */ -export declare class SystemJsCmpFactoryResolver implements ComponentResolver { - constructor(_console: Console); - clearCache(): void; - resolveComponent(componentType: string | Type): Promise>; -} - -/** @deprecated */ -export declare class SystemJsComponentResolver implements ComponentResolver { - constructor(_resolver: ComponentResolver, _console: Console); - clearCache(): void; - resolveComponent(componentType: string | Type): Promise>; -} - /** @experimental */ export declare class SystemJsNgModuleLoader implements NgModuleFactoryLoader { constructor(_compiler: Compiler);