refactor(compiler): Drop support for the deprecated <template>. Use <ng-template> instead (#22783)
BREAKING CHANGE:
The `<template>` tag was deprecated in Angular v4 to avoid collisions (i.e. when
using Web Components).
This commit removes support for `<template>`. `<ng-template>` should be used
instead.
BEFORE:
<!-- html template -->
<template>some template content</template>
# tsconfig.json
{
# ...
"angularCompilerOptions": {
# ...
# This option is no more supported and will have no effect
"enableLegacyTemplate": [true|false]
}
}
AFTER:
<!-- html template -->
<ng-template>some template content</ng-template>
PR Close #22783
This commit is contained in:
committed by
Miško Hevery
parent
4e6ac185e5
commit
0ebd577db4
@@ -50,7 +50,6 @@ export interface CompilerOptions extends ts.CompilerOptions {
|
||||
annotateForClosureCompiler?: boolean;
|
||||
annotationsAs?: 'decorators'|'static fields';
|
||||
trace?: boolean;
|
||||
enableLegacyTemplate?: boolean;
|
||||
disableExpressionLowering?: boolean;
|
||||
i18nOutLocale?: string;
|
||||
i18nOutFormat?: string;
|
||||
|
||||
@@ -125,9 +125,6 @@ export interface CompilerOptions extends ts.CompilerOptions {
|
||||
// Print extra information while running the compiler
|
||||
trace?: boolean;
|
||||
|
||||
// Whether to enable support for <template> and the template attribute (false by default)
|
||||
enableLegacyTemplate?: boolean;
|
||||
|
||||
// Whether to enable lowering expressions lambdas and expressions in a reference value
|
||||
// position.
|
||||
disableExpressionLowering?: boolean;
|
||||
|
||||
@@ -828,7 +828,6 @@ function getAotCompilerOptions(options: CompilerOptions): AotCompilerOptions {
|
||||
return {
|
||||
locale: options.i18nInLocale,
|
||||
i18nFormat: options.i18nInFormat || options.i18nOutFormat, translations, missingTranslation,
|
||||
enableLegacyTemplate: options.enableLegacyTemplate,
|
||||
enableSummariesForJit: options.enableSummariesForJit,
|
||||
preserveWhitespaces: options.preserveWhitespaces,
|
||||
fullTemplateTypeCheck: options.fullTemplateTypeCheck,
|
||||
|
||||
Reference in New Issue
Block a user