File tree 1 file changed +15
-5
lines changed 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change 18
18
19
19
### BREAKING CHANGES
20
20
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- ` .
26
22
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]="..."> `
27
37
28
38
29
39
<a name =" 2.0.0-beta.16 " ></a >
You can’t perform that action at this time.
0 commit comments