feat(core): renames Property into Input and Event into Output
BREACKING CHANGE: Before: @Directive({properties: ['one'], events: ['two']}) After: @Directive({inputs: ['one'], outputs: ['two']}) Before: @Component({properties: ['one'], events: ['two']}) After: @Componet({inputs: ['one'], outputs: ['two']}) Before: class A {@Property() one; @Event() two;} After: class A {@Input() one; @Output() two;}
This commit is contained in:
@ -109,26 +109,26 @@ class CompilerAppComponent {
|
||||
}
|
||||
}
|
||||
|
||||
@Directive({selector: '[dir0]', properties: ['prop: attr0']})
|
||||
@Directive({selector: '[dir0]', inputs: ['prop: attr0']})
|
||||
class Dir0 {
|
||||
}
|
||||
|
||||
@Directive({selector: '[dir1]', properties: ['prop: attr1']})
|
||||
@Directive({selector: '[dir1]', inputs: ['prop: attr1']})
|
||||
class Dir1 {
|
||||
constructor(dir0: Dir0) {}
|
||||
}
|
||||
|
||||
@Directive({selector: '[dir2]', properties: ['prop: attr2']})
|
||||
@Directive({selector: '[dir2]', inputs: ['prop: attr2']})
|
||||
class Dir2 {
|
||||
constructor(dir1: Dir1) {}
|
||||
}
|
||||
|
||||
@Directive({selector: '[dir3]', properties: ['prop: attr3']})
|
||||
@Directive({selector: '[dir3]', inputs: ['prop: attr3']})
|
||||
class Dir3 {
|
||||
constructor(dir2: Dir2) {}
|
||||
}
|
||||
|
||||
@Directive({selector: '[dir4]', properties: ['prop: attr4']})
|
||||
@Directive({selector: '[dir4]', inputs: ['prop: attr4']})
|
||||
class Dir4 {
|
||||
constructor(dir3: Dir3) {}
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ class CellData {
|
||||
iFn() { return this.i; }
|
||||
}
|
||||
|
||||
@Component({selector: 'largetable', properties: ['data', 'benchmarkType']})
|
||||
@Component({selector: 'largetable', inputs: ['data', 'benchmarkType']})
|
||||
@View({
|
||||
directives: [NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault],
|
||||
template: `
|
||||
|
@ -12,19 +12,19 @@ export class HasStyle {
|
||||
set width(w: number) { this.cellWidth = w; }
|
||||
}
|
||||
|
||||
@Component({selector: 'company-name', properties: ['width: cell-width', 'company']})
|
||||
@Component({selector: 'company-name', inputs: ['width: cell-width', 'company']})
|
||||
@View({directives: [], template: `<div [style.width.px]="cellWidth">{{company.name}}</div>`})
|
||||
export class CompanyNameComponent extends HasStyle {
|
||||
company: Company;
|
||||
}
|
||||
|
||||
@Component({selector: 'opportunity-name', properties: ['width: cell-width', 'opportunity']})
|
||||
@Component({selector: 'opportunity-name', inputs: ['width: cell-width', 'opportunity']})
|
||||
@View({directives: [], template: `<div [style.width.px]="cellWidth">{{opportunity.name}}</div>`})
|
||||
export class OpportunityNameComponent extends HasStyle {
|
||||
opportunity: Opportunity;
|
||||
}
|
||||
|
||||
@Component({selector: 'offering-name', properties: ['width: cell-width', 'offering']})
|
||||
@Component({selector: 'offering-name', inputs: ['width: cell-width', 'offering']})
|
||||
@View({directives: [], template: `<div [style.width.px]="cellWidth">{{offering.name}}</div>`})
|
||||
export class OfferingNameComponent extends HasStyle {
|
||||
offering: Offering;
|
||||
@ -37,7 +37,7 @@ export class Stage {
|
||||
apply: Function;
|
||||
}
|
||||
|
||||
@Component({selector: 'stage-buttons', properties: ['width: cell-width', 'offering']})
|
||||
@Component({selector: 'stage-buttons', inputs: ['width: cell-width', 'offering']})
|
||||
@View({
|
||||
directives: [NgFor],
|
||||
template: `
|
||||
@ -82,7 +82,7 @@ export class StageButtonsComponent extends HasStyle {
|
||||
}
|
||||
}
|
||||
|
||||
@Component({selector: 'account-cell', properties: ['width: cell-width', 'account']})
|
||||
@Component({selector: 'account-cell', inputs: ['width: cell-width', 'account']})
|
||||
@View({
|
||||
directives: [],
|
||||
template: `
|
||||
@ -96,7 +96,7 @@ export class AccountCellComponent extends HasStyle {
|
||||
account: Account;
|
||||
}
|
||||
|
||||
@Component({selector: 'formatted-cell', properties: ['width: cell-width', 'value']})
|
||||
@Component({selector: 'formatted-cell', inputs: ['width: cell-width', 'value']})
|
||||
@View({directives: [], template: `<div [style.width.px]="cellWidth">{{formattedValue}}</div>`})
|
||||
export class FormattedCellComponent extends HasStyle {
|
||||
formattedValue: string;
|
||||
|
@ -25,7 +25,7 @@ import {
|
||||
AAT_STATUS_WIDTH
|
||||
} from './common';
|
||||
|
||||
@Component({selector: 'scroll-item', properties: ['offering']})
|
||||
@Component({selector: 'scroll-item', inputs: ['offering']})
|
||||
@View({
|
||||
directives: [
|
||||
CompanyNameComponent,
|
||||
|
@ -226,12 +226,12 @@ class StaticTreeComponentBase {
|
||||
get data() { return this._value; }
|
||||
}
|
||||
|
||||
@Component({selector: 'tree', properties: ['data']})
|
||||
@Component({selector: 'tree', inputs: ['data']})
|
||||
@View({directives: [], template: '<span>{{data.value}} </span>'})
|
||||
class StaticTreeComponent0 extends StaticTreeComponentBase {
|
||||
}
|
||||
|
||||
@Component({selector: 'tree', properties: ['data']})
|
||||
@Component({selector: 'tree', inputs: ['data']})
|
||||
@View({
|
||||
directives: [StaticTreeComponent0],
|
||||
template:
|
||||
@ -240,7 +240,7 @@ class StaticTreeComponent0 extends StaticTreeComponentBase {
|
||||
class StaticTreeComponent1 extends StaticTreeComponentBase {
|
||||
}
|
||||
|
||||
@Component({selector: 'tree', properties: ['data']})
|
||||
@Component({selector: 'tree', inputs: ['data']})
|
||||
@View({
|
||||
directives: [StaticTreeComponent1],
|
||||
template:
|
||||
@ -250,7 +250,7 @@ class StaticTreeComponent2 extends StaticTreeComponentBase {
|
||||
data: TreeNode;
|
||||
}
|
||||
|
||||
@Component({selector: 'tree', properties: ['data']})
|
||||
@Component({selector: 'tree', inputs: ['data']})
|
||||
@View({
|
||||
directives: [StaticTreeComponent2],
|
||||
template:
|
||||
@ -259,7 +259,7 @@ class StaticTreeComponent2 extends StaticTreeComponentBase {
|
||||
class StaticTreeComponent3 extends StaticTreeComponentBase {
|
||||
}
|
||||
|
||||
@Component({selector: 'tree', properties: ['data']})
|
||||
@Component({selector: 'tree', inputs: ['data']})
|
||||
@View({
|
||||
directives: [StaticTreeComponent3],
|
||||
template:
|
||||
@ -268,7 +268,7 @@ class StaticTreeComponent3 extends StaticTreeComponentBase {
|
||||
class StaticTreeComponent4 extends StaticTreeComponentBase {
|
||||
}
|
||||
|
||||
@Component({selector: 'tree', properties: ['data']})
|
||||
@Component({selector: 'tree', inputs: ['data']})
|
||||
@View({
|
||||
directives: [StaticTreeComponent4],
|
||||
template:
|
||||
@ -277,7 +277,7 @@ class StaticTreeComponent4 extends StaticTreeComponentBase {
|
||||
class StaticTreeComponent5 extends StaticTreeComponentBase {
|
||||
}
|
||||
|
||||
@Component({selector: 'tree', properties: ['data']})
|
||||
@Component({selector: 'tree', inputs: ['data']})
|
||||
@View({
|
||||
directives: [StaticTreeComponent5],
|
||||
template:
|
||||
@ -286,7 +286,7 @@ class StaticTreeComponent5 extends StaticTreeComponentBase {
|
||||
class StaticTreeComponent6 extends StaticTreeComponentBase {
|
||||
}
|
||||
|
||||
@Component({selector: 'tree', properties: ['data']})
|
||||
@Component({selector: 'tree', inputs: ['data']})
|
||||
@View({
|
||||
directives: [StaticTreeComponent6],
|
||||
template:
|
||||
@ -295,7 +295,7 @@ class StaticTreeComponent6 extends StaticTreeComponentBase {
|
||||
class StaticTreeComponent7 extends StaticTreeComponentBase {
|
||||
}
|
||||
|
||||
@Component({selector: 'tree', properties: ['data']})
|
||||
@Component({selector: 'tree', inputs: ['data']})
|
||||
@View({
|
||||
directives: [StaticTreeComponent7],
|
||||
template:
|
||||
@ -304,7 +304,7 @@ class StaticTreeComponent7 extends StaticTreeComponentBase {
|
||||
class StaticTreeComponent8 extends StaticTreeComponentBase {
|
||||
}
|
||||
|
||||
@Component({selector: 'tree', properties: ['data']})
|
||||
@Component({selector: 'tree', inputs: ['data']})
|
||||
@View({
|
||||
directives: [StaticTreeComponent8],
|
||||
template:
|
||||
|
@ -218,7 +218,7 @@ class BaseLineIf {
|
||||
}
|
||||
}
|
||||
|
||||
@Component({selector: 'tree', properties: ['data']})
|
||||
@Component({selector: 'tree', inputs: ['data']})
|
||||
@View({
|
||||
directives: [TreeComponent, NgIf],
|
||||
template:
|
||||
|
Reference in New Issue
Block a user