feat(compiler): detect dangling property bindings
BREAKING CHANGE: compiler will throw on binding to non-existing properties. Till now it was possible to have a binding to a non-existing property, ex.: `<div [foo]="exp">`. From now on this is compilation error - any property binding needs to have at least one associated property: eaither on an HTML element or on any directive associated with a given element (directives' properites need to be declared using the `properties` field in the `@Directive` / `@Component` annotation). Closes #2598
This commit is contained in:
@ -232,7 +232,7 @@ class CellData {
|
||||
</tbody>
|
||||
<tbody template="ng-switch-when 'interpolationAttr'">
|
||||
<tr template="ng-for #row of data">
|
||||
<td template="ng-for #column of row" i="{{column.i}}" j="{{column.j}}">
|
||||
<td template="ng-for #column of row" attr.i="{{column.i}}" attr.j="{{column.j}}">
|
||||
i,j attrs
|
||||
</td>
|
||||
</tr>
|
||||
@ -269,7 +269,7 @@ class LargetableComponent {
|
||||
@Component({selector: 'app'})
|
||||
@View({
|
||||
directives: [LargetableComponent],
|
||||
template: `<largetable [data]='data' [benchmarkType]='benchmarkType'></largetable>`
|
||||
template: `<largetable [data]='data' [benchmark-type]='benchmarkType'></largetable>`
|
||||
})
|
||||
class AppComponent {
|
||||
data;
|
||||
|
Reference in New Issue
Block a user