Skip to content

Commit 073ec0a

Browse files
committed
chore(CHANGELOG): Fix breaking changes description
Adds more info and examples about how ngFor is affected by the change.
1 parent 70b23ae commit 073ec0a

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

CHANGELOG.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,22 @@
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>

0 commit comments

Comments
 (0)