File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed
Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change 1818
1919### BREAKING CHANGES
2020
21- * - ` #... ` now always means ` ref- ` .
22- - ` <template #abc> ` now defines a reference to the TemplateRef, instead of an input variable used inside of the template.
23- - ` #... ` inside of a * ngIf, … directives is deprecated.
24- Use ` let … ` instead.
25- - ` var-... ` is deprecated. Replace with ` let-... ` for ` <template> ` elements and ` ref- ` for non ` <template> ` elements.
21+ The reference ` #... ` now always means ` ref- ` .
2622
23+ ** Before:**
24+ - Outside of ` ngFor ` , a ` #... ` meant a reference.
25+ - Inside of ` ngFor ` , it meant a local variable.
26+
27+ This was pattern was confusing.
28+
29+ ** After:**
30+
31+ - ` <template #abc> ` now defines a reference to a TemplateRef, instead of an input variable used inside of the template.
32+ - Inside of structural directives that declare local variables, such as ` *ngFor ` , usage of ` #... ` is deprecated. Use ` let ` instead.
33+ - ` <div *ngFor="#item of items"> ` now becomes ` <div *ngFor="let item of items"> `
34+ - ` var-... ` is deprecated.
35+ - use ` # ` or a ` ref- ` outside of ` *ngFor `
36+ - for ` ngFor ` , use the syntax: ` <template ngFor let-... [ngForOf]="..."> `
2737
2838
2939<a name =" 2.0.0-beta.16 " ></a >
You can’t perform that action at this time.
0 commit comments