refactor(compiler): don’t rely on global reflector (#16832)
Using the global reflector made it impossible to compile multiple programs at the same time.
This commit is contained in:

committed by
Chuck Jazdzewski

parent
de8d7c65f2
commit
50abca4583
@ -6,9 +6,10 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {ChangeDetectionStrategy, ComponentFactory, RendererType2, SchemaMetadata, Type, ViewEncapsulation, ɵLifecycleHooks, ɵreflector, ɵstringify as stringify} from '@angular/core';
|
||||
import {ChangeDetectionStrategy, ComponentFactory, RendererType2, SchemaMetadata, Type, ViewEncapsulation, ɵstringify as stringify} from '@angular/core';
|
||||
|
||||
import {StaticSymbol} from './aot/static_symbol';
|
||||
import {LifecycleHooks} from './lifecycle_reflector';
|
||||
import {CssSelector} from './selector';
|
||||
import {splitAtColon} from './util';
|
||||
|
||||
@ -111,7 +112,8 @@ export function identifierModuleUrl(compileIdentifier: CompileIdentifierMetadata
|
||||
if (ref instanceof StaticSymbol) {
|
||||
return ref.filePath;
|
||||
}
|
||||
return ɵreflector.importUri(ref);
|
||||
// Runtime type
|
||||
return `./${stringify(ref)}`;
|
||||
}
|
||||
|
||||
export function viewClassName(compType: any, embeddedTemplateIndex: number): string {
|
||||
@ -203,7 +205,7 @@ export interface CompileTokenMetadata {
|
||||
*/
|
||||
export interface CompileTypeMetadata extends CompileIdentifierMetadata {
|
||||
diDeps: CompileDiDependencyMetadata[];
|
||||
lifecycleHooks: ɵLifecycleHooks[];
|
||||
lifecycleHooks: LifecycleHooks[];
|
||||
reference: any;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user