linkCompiler
npm Package | @angular/core |
---|---|
Module | import { Compiler } from '@angular/core'; |
Source | core/src/linker/compiler.ts |
linkOverview
class Compiler {
compileModuleSync<T>(moduleType: Type<T>): NgModuleFactory<T>
compileModuleAsync<T>(moduleType: Type<T>): Promise<NgModuleFactory<T>>
compileModuleAndAllComponentsSync<T>(moduleType: Type<T>): ModuleWithComponentFactories<T>
compileModuleAndAllComponentsAsync<T>(moduleType: Type<T>): Promise<ModuleWithComponentFactories<T>>
clearCache(): void
clearCacheFor(type: Type<any>)
}
linkDescription
Low-level service for running the angular compiler during runtime
to create ComponentFactory
s, which
can later be used to create and render a Component instance.
Each @NgModule
provides an own Compiler
to its injector,
that will use the directives/pipes of the ng module for compilation
of components.
linkMembers
compileModuleSync<T>(moduleType: Type<T>): NgModuleFactory<T>
Compiles the given NgModule and all of its components. All templates of the components listed
in entryComponents
have to be inlined.
compileModuleAsync<T>(moduleType: Type<T>): Promise<NgModuleFactory<T>>
Compiles the given NgModule and all of its components
compileModuleAndAllComponentsSync<T>(moduleType: Type<T>): ModuleWithComponentFactories<T>
Same as compileModuleSync but also creates ComponentFactories for all components.
compileModuleAndAllComponentsAsync<T>(moduleType: Type<T>): Promise<ModuleWithComponentFactories<T>>
Same as compileModuleAsync but also creates ComponentFactories for all components.
linkAnnotations
@Injectable()