docs(compiler): incorrect method reference (#14314)

PR Close #14314
This commit is contained in:
mgechev 2017-02-05 14:22:06 -08:00 committed by Miško Hevery
parent 1e3dd3dd9b
commit a378aab9aa
2 changed files with 5 additions and 5 deletions

View File

@ -114,7 +114,7 @@ export class JitCompiler implements Compiler {
// Note: the loadingPromise for a module only includes the loading of the exported directives // Note: the loadingPromise for a module only includes the loading of the exported directives
// of imported modules. // of imported modules.
// However, for runtime compilation, we want to transitively compile all modules, // However, for runtime compilation, we want to transitively compile all modules,
// so we also need to call loadNgModuleMetadata for all nested modules. // so we also need to call loadNgModuleDirectiveAndPipeMetadata for all nested modules.
ngModule.transitiveModule.modules.forEach((localModuleMeta) => { ngModule.transitiveModule.modules.forEach((localModuleMeta) => {
loadingPromises.push(this._metadataResolver.loadNgModuleDirectiveAndPipeMetadata( loadingPromises.push(this._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(
localModuleMeta.reference, isSync)); localModuleMeta.reference, isSync));

View File

@ -377,14 +377,14 @@ export class CompileMetadataResolver {
/** /**
* Gets the metadata for the given directive. * Gets the metadata for the given directive.
* This assumes `loadNgModuleMetadata` has been called first. * This assumes `loadNgModuleDirectiveAndPipeMetadata` has been called first.
*/ */
getDirectiveMetadata(directiveType: any): cpl.CompileDirectiveMetadata { getDirectiveMetadata(directiveType: any): cpl.CompileDirectiveMetadata {
const dirMeta = this._directiveCache.get(directiveType); const dirMeta = this._directiveCache.get(directiveType);
if (!dirMeta) { if (!dirMeta) {
this._reportError( this._reportError(
new SyntaxError( new SyntaxError(
`Illegal state: getDirectiveMetadata can only be called after loadNgModuleMetadata for a module that declares it. Directive ${stringifyType(directiveType)}.`), `Illegal state: getDirectiveMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Directive ${stringifyType(directiveType)}.`),
directiveType); directiveType);
} }
return dirMeta; return dirMeta;
@ -732,14 +732,14 @@ export class CompileMetadataResolver {
/** /**
* Gets the metadata for the given pipe. * Gets the metadata for the given pipe.
* This assumes `loadNgModuleMetadata` has been called first. * This assumes `loadNgModuleDirectiveAndPipeMetadata` has been called first.
*/ */
getPipeMetadata(pipeType: any): cpl.CompilePipeMetadata { getPipeMetadata(pipeType: any): cpl.CompilePipeMetadata {
const pipeMeta = this._pipeCache.get(pipeType); const pipeMeta = this._pipeCache.get(pipeType);
if (!pipeMeta) { if (!pipeMeta) {
this._reportError( this._reportError(
new SyntaxError( new SyntaxError(
`Illegal state: getPipeMetadata can only be called after loadNgModuleMetadata for a module that declares it. Pipe ${stringifyType(pipeType)}.`), `Illegal state: getPipeMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Pipe ${stringifyType(pipeType)}.`),
pipeType); pipeType);
} }
return pipeMeta; return pipeMeta;