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
@ -25,9 +25,9 @@ import {ScrollAreaComponent} from './scroll_area';
|
||||
<div style="display: flex">
|
||||
<scroll-area id="testArea"></scroll-area>
|
||||
</div>
|
||||
<div template="ngIf scrollAreas.length > 0">
|
||||
<div *ngIf="scrollAreas.length > 0">
|
||||
<p>Following tables are only here to add weight to the UI:</p>
|
||||
<scroll-area template="ngFor let scrollArea of scrollAreas"></scroll-area>
|
||||
<scroll-area *ngFor="let scrollArea of scrollAreas"></scroll-area>
|
||||
</div>
|
||||
</div>`
|
||||
})
|
||||
|
@ -62,7 +62,7 @@ export class Stage {
|
||||
directives: [NgFor],
|
||||
template: `
|
||||
<div [style.width.px]="cellWidth">
|
||||
<button template="ngFor let stage of stages"
|
||||
<button *ngFor="let stage of stages"
|
||||
[disabled]="stage.isDisabled"
|
||||
[style.background-color]="stage.backgroundColor"
|
||||
on-click="setStage(stage)">
|
||||
|
@ -25,7 +25,7 @@ import {ScrollItemComponent} from './scroll_item';
|
||||
<div id="padding"></div>
|
||||
<div id="inner">
|
||||
<scroll-item
|
||||
template="ngFor let item of visibleItems"
|
||||
*ngFor="let item of visibleItems"
|
||||
[offering]="item">
|
||||
</scroll-item>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user