diff --git a/modules/@angular/compiler-cli/src/codegen.ts b/modules/@angular/compiler-cli/src/codegen.ts index 0a418b7a72..b1ad00d02a 100644 --- a/modules/@angular/compiler-cli/src/codegen.ts +++ b/modules/@angular/compiler-cli/src/codegen.ts @@ -75,7 +75,8 @@ export class CodeGenerator { debug: options.debug === true, translations: transContent, i18nFormat: cliOptions.i18nFormat, - locale: cliOptions.locale + locale: cliOptions.locale, + enableLegacyTemplate: options.enableLegacyTemplate !== false, }); return new CodeGenerator(options, program, tsCompilerHost, aotCompiler, ngCompilerHost); } diff --git a/modules/@angular/compiler/src/aot/compiler_factory.ts b/modules/@angular/compiler/src/aot/compiler_factory.ts index b5da6f1f2d..8283ff4741 100644 --- a/modules/@angular/compiler/src/aot/compiler_factory.ts +++ b/modules/@angular/compiler/src/aot/compiler_factory.ts @@ -61,7 +61,8 @@ export function createAotCompiler(compilerHost: AotCompilerHost, options: AotCom defaultEncapsulation: ViewEncapsulation.Emulated, logBindingUpdate: false, useJit: false, - useViewEngine: options.useViewEngine + useViewEngine: options.useViewEngine, + enableLegacyTemplate: options.enableLegacyTemplate !== false, }); const normalizer = new DirectiveNormalizer( {get: (url: string) => compilerHost.loadResource(url)}, urlResolver, htmlParser, config); diff --git a/modules/@angular/compiler/src/aot/compiler_options.ts b/modules/@angular/compiler/src/aot/compiler_options.ts index 331b319c71..adafef9916 100644 --- a/modules/@angular/compiler/src/aot/compiler_options.ts +++ b/modules/@angular/compiler/src/aot/compiler_options.ts @@ -12,4 +12,5 @@ export interface AotCompilerOptions { i18nFormat?: string; translations?: string; useViewEngine?: boolean; + enableLegacyTemplate?: boolean; } diff --git a/modules/@angular/compiler/src/config.ts b/modules/@angular/compiler/src/config.ts index 9d14435c78..db9d65aa3c 100644 --- a/modules/@angular/compiler/src/config.ts +++ b/modules/@angular/compiler/src/config.ts @@ -23,22 +23,28 @@ export const USE_VIEW_ENGINE = new InjectionToken('UseViewEngine'); export class CompilerConfig { public renderTypes: RenderTypes; public defaultEncapsulation: ViewEncapsulation; - private _genDebugInfo: boolean; - private _logBindingUpdate: boolean; + // Whether to support the `