2.0.0-beta.17 released [Breaking Changes]
Angular team released another beta this week, which unfortunately has some breaking changes. This is normal and should be expected if you are building apps with beta frameworks.
BREAKING CHANGES
The reference #...
now always means ref-
.
Before:
- Outside of
ngFor
, a#...
meant a reference. - Inside of
ngFor
, it meant a local variable.
This was pattern was confusing.
After:
<template #abc>
now defines a reference to a TemplateRef, instead of an input variable used inside of the template.- Inside of structural directives that declare local variables, such as
*ngFor
, usage of#...
is deprecated. Uselet
instead.<div *ngFor="#item of items">
now becomes<div *ngFor="let item of items">
var-...
is deprecated.- use
#
or aref-
outside of*ngFor
- for
ngFor
, use the syntax:<template ngFor let-... [ngForOf]="...">
- use
Bug Fixes
- changelog: fix changelog script. (c209836)
- compiler: Allow templates to access variables that are declared afterwards. (1e8864c), closes #8261
- core: properly evaluate expressions with conditional and boolean operators (1ad2a02), closes #8235 #8244 #8282
- metadata: Do not attach module names to metadata. (d964888), closes #8225 #8082 #8256
- testing: allow test component builder to override directives from lists (ff2ae7a), closes #7397 #8217