feat: camelCase Angular (kebab-case removal)
BREAKING CHANGE: Angular is now fully camel case. Before: <p *ng-if="cond"> <my-cmp [my-prop]="exp"> <my-cmp (my-event)="action()"> <my-cmp [(my-prop)]="prop"> <input #my-input> <template ng-for #my-item [ng-for-of]=items #my-index="index"> After <p *ngIf="cond"> <my-cmp [myProp]="exp"> <my-cmp (myEvent)="action()"> <my-cmp [(myProp)]="prop"> <input #myInput>`, <template ngFor="#my-item" [ngForOf]=items #myIndex="index"> The full details are found in [angular2/docs/migration/kebab-case.md](https://github.com/angular/angular/blob/master/modules/angular2/docs/migration/kebab-case.md)
This commit is contained in:

committed by
Igor Minar

parent
b386d1134a
commit
da9b46a071
@ -63,16 +63,16 @@ class DynamicDummy {
|
||||
@View({
|
||||
directives: [NgIf, NgFor, DummyComponent, DummyDirective, DynamicDummy],
|
||||
template: `
|
||||
<div *ng-if="testingPlainComponents">
|
||||
<dummy *ng-for="#i of list"></dummy>
|
||||
<div *ngIf="testingPlainComponents">
|
||||
<dummy *ngFor="#i of list"></dummy>
|
||||
</div>
|
||||
|
||||
<div *ng-if="testingWithDirectives">
|
||||
<dummy dummy-decorator *ng-for="#i of list"></dummy>
|
||||
<div *ngIf="testingWithDirectives">
|
||||
<dummy dummy-decorator *ngFor="#i of list"></dummy>
|
||||
</div>
|
||||
|
||||
<div *ng-if="testingDynamicComponents">
|
||||
<dynamic-dummy *ng-for="#i of list"></dynamic-dummy>
|
||||
<div *ngIf="testingDynamicComponents">
|
||||
<dynamic-dummy *ngFor="#i of list"></dynamic-dummy>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
|
@ -214,29 +214,29 @@ class CellData {
|
||||
@View({
|
||||
directives: [NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault],
|
||||
template: `
|
||||
<table [ng-switch]="benchmarkType">
|
||||
<tbody template="ng-switch-when 'interpolation'">
|
||||
<tr template="ng-for #row of data">
|
||||
<td template="ng-for #column of row">
|
||||
<table [ngSwitch]="benchmarkType">
|
||||
<tbody template="ngSwitchWhen 'interpolation'">
|
||||
<tr template="ngFor #row of data">
|
||||
<td template="ngFor #column of row">
|
||||
{{column.i}}:{{column.j}}|
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody template="ng-switch-when 'interpolationAttr'">
|
||||
<tr template="ng-for #row of data">
|
||||
<td template="ng-for #column of row" attr.i="{{column.i}}" attr.j="{{column.j}}">
|
||||
<tbody template="ngSwitchWhen 'interpolationAttr'">
|
||||
<tr template="ngFor #row of data">
|
||||
<td template="ngFor #column of row" attr.i="{{column.i}}" attr.j="{{column.j}}">
|
||||
i,j attrs
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody template="ng-switch-when 'interpolationFn'">
|
||||
<tr template="ng-for #row of data">
|
||||
<td template="ng-for #column of row">
|
||||
<tbody template="ngSwitchWhen 'interpolationFn'">
|
||||
<tr template="ngFor #row of data">
|
||||
<td template="ngFor #column of row">
|
||||
{{column.iFn()}}:{{column.jFn()}}|
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody template="ng-switch-default">
|
||||
<tbody template="ngSwitchDefault">
|
||||
<tr>
|
||||
<td>
|
||||
<em>{{benchmarkType}} not yet implemented</em>
|
||||
@ -261,7 +261,7 @@ class LargetableComponent {
|
||||
@Component({selector: 'app'})
|
||||
@View({
|
||||
directives: [LargetableComponent],
|
||||
template: `<largetable [data]='data' [benchmark-type]='benchmarkType'></largetable>`
|
||||
template: `<largetable [data]='data' [benchmarkType]='benchmarkType'></largetable>`
|
||||
})
|
||||
class AppComponent {
|
||||
data;
|
||||
|
@ -17,9 +17,9 @@ import {Component, Directive, View} from 'angular2/angular2';
|
||||
<div style="display: flex">
|
||||
<scroll-area id="testArea"></scroll-area>
|
||||
</div>
|
||||
<div template="ng-if scrollAreas.length > 0">
|
||||
<div template="ngIf scrollAreas.length > 0">
|
||||
<p>Following tables are only here to add weight to the UI:</p>
|
||||
<scroll-area template="ng-for #scrollArea of scrollAreas"></scroll-area>
|
||||
<scroll-area template="ngFor #scrollArea of scrollAreas"></scroll-area>
|
||||
</div>
|
||||
</div>`
|
||||
})
|
||||
|
@ -42,7 +42,7 @@ export class Stage {
|
||||
directives: [NgFor],
|
||||
template: `
|
||||
<div [style.width.px]="cellWidth">
|
||||
<button template="ng-for #stage of stages"
|
||||
<button template="ngFor #stage of stages"
|
||||
[disabled]="stage.isDisabled"
|
||||
[style.background-color]="stage.backgroundColor"
|
||||
on-click="setStage(stage)">
|
||||
|
@ -30,7 +30,7 @@ import {NgFor} from 'angular2/common';
|
||||
<div id="padding"></div>
|
||||
<div id="inner">
|
||||
<scroll-item
|
||||
template="ng-for #item of visibleItems"
|
||||
template="ngFor #item of visibleItems"
|
||||
[offering]="item">
|
||||
</scroll-item>
|
||||
</div>
|
||||
|
@ -308,7 +308,7 @@ class StaticTreeComponent9 extends StaticTreeComponentBase {
|
||||
@Component({selector: 'app'})
|
||||
@View({
|
||||
directives: [StaticTreeComponent9, NgIf],
|
||||
template: `<tree *ng-if="initData != null" [data]='initData'></tree>`
|
||||
template: `<tree *ngIf="initData != null" [data]='initData'></tree>`
|
||||
})
|
||||
class AppComponentWithStaticTree {
|
||||
initData: TreeNode;
|
||||
|
@ -223,7 +223,7 @@ class BaseLineIf {
|
||||
@View({
|
||||
directives: [TreeComponent, NgIf],
|
||||
template:
|
||||
`<span> {{data.value}} <span template='ng-if data.right != null'><tree [data]='data.right'></tree></span><span template='ng-if data.left != null'><tree [data]='data.left'></tree></span></span>`
|
||||
`<span> {{data.value}} <span template='ngIf data.right != null'><tree [data]='data.right'></tree></span><span template='ngIf data.left != null'><tree [data]='data.left'></tree></span></span>`
|
||||
})
|
||||
class TreeComponent {
|
||||
data: TreeNode;
|
||||
|
Reference in New Issue
Block a user