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:
@@ -67,7 +67,7 @@ class DemoApp {
|
||||
|
||||
@Component({
|
||||
selector: 'simple-dialog',
|
||||
properties: ['numCoconuts'],
|
||||
inputs: ['numCoconuts'],
|
||||
})
|
||||
@View({
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
|
||||
@@ -41,7 +41,7 @@ function creditCardValidator(c): StringMap<string, boolean> {
|
||||
* actual error message.
|
||||
* To make it simple, we are using a simple map here.
|
||||
*/
|
||||
@Component({selector: 'show-error', properties: ['controlPath: control', 'errorTypes: errors']})
|
||||
@Component({selector: 'show-error', inputs: ['controlPath: control', 'errorTypes: errors']})
|
||||
@View({
|
||||
template: `
|
||||
<span *ng-if="errorMessage !== null">{{errorMessage}}</span>
|
||||
|
||||
@@ -16,7 +16,7 @@ class HasStyle {
|
||||
}
|
||||
@Component(
|
||||
selector: "company-name",
|
||||
properties: const ["width: cell-width", "company"],
|
||||
inputs: const ["width: cell-width", "company"],
|
||||
changeDetection: ChangeDetectionStrategy.OnPushObserve
|
||||
)
|
||||
@View(
|
||||
@@ -28,7 +28,7 @@ class CompanyNameComponent extends HasStyle {
|
||||
}
|
||||
@Component(
|
||||
selector: "opportunity-name",
|
||||
properties: const ["width: cell-width", "opportunity"],
|
||||
inputs: const ["width: cell-width", "opportunity"],
|
||||
changeDetection: ChangeDetectionStrategy.OnPushObserve
|
||||
)
|
||||
@View(
|
||||
@@ -40,7 +40,7 @@ class OpportunityNameComponent extends HasStyle {
|
||||
}
|
||||
@Component(
|
||||
selector: "offering-name",
|
||||
properties: const ["width: cell-width", "offering"],
|
||||
inputs: const ["width: cell-width", "offering"],
|
||||
changeDetection: ChangeDetectionStrategy.OnPushObserve
|
||||
)
|
||||
@View(
|
||||
@@ -58,7 +58,7 @@ class Stage {
|
||||
}
|
||||
@Component(
|
||||
selector: "stage-buttons",
|
||||
properties: const ["width: cell-width", "offering"],
|
||||
inputs: const ["width: cell-width", "offering"],
|
||||
changeDetection: ChangeDetectionStrategy.OnPushObserve
|
||||
)
|
||||
@View(directives: const [NgFor], template: '''
|
||||
@@ -102,7 +102,7 @@ class StageButtonsComponent extends HasStyle {
|
||||
}
|
||||
@Component(
|
||||
selector: "account-cell",
|
||||
properties: const ["width: cell-width", "account"],
|
||||
inputs: const ["width: cell-width", "account"],
|
||||
changeDetection: ChangeDetectionStrategy.OnPushObserve
|
||||
)
|
||||
@View(directives: const [], template: '''
|
||||
@@ -116,7 +116,7 @@ class AccountCellComponent extends HasStyle {
|
||||
}
|
||||
@Component(
|
||||
selector: "formatted-cell",
|
||||
properties: const ["width: cell-width", "value"],
|
||||
inputs: const ["width: cell-width", "value"],
|
||||
changeDetection: ChangeDetectionStrategy.OnPushObserve
|
||||
)
|
||||
@View(
|
||||
|
||||
@@ -25,7 +25,7 @@ import "common.dart"
|
||||
END_DATE_WIDTH,
|
||||
AAT_STATUS_WIDTH;
|
||||
|
||||
@Component(selector: "scroll-item", properties: const ["offering"],
|
||||
@Component(selector: "scroll-item", inputs: const ["offering"],
|
||||
changeDetection: ChangeDetectionStrategy.OnPushObserve)
|
||||
@View(
|
||||
directives: const [
|
||||
|
||||
@@ -116,7 +116,7 @@ class OrderListComponent {
|
||||
}
|
||||
|
||||
|
||||
@Component({selector: 'order-item-cmp', properties: ['item'], events: ['delete']})
|
||||
@Component({selector: 'order-item-cmp', inputs: ['item'], outputs: ['delete']})
|
||||
@View({
|
||||
template: `
|
||||
<div>
|
||||
|
||||
@@ -65,7 +65,7 @@ class CreditCardValidator {
|
||||
* actual error message.
|
||||
* To make it simple, we are using a simple map here.
|
||||
*/
|
||||
@Component({selector: 'show-error', properties: ['controlPath: control', 'errorTypes: errors']})
|
||||
@Component({selector: 'show-error', inputs: ['controlPath: control', 'errorTypes: errors']})
|
||||
@View({
|
||||
template: `
|
||||
<span *ng-if="errorMessage !== null">{{errorMessage}}</span>
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
import {Component, View, EventEmitter} from 'angular2/angular2';
|
||||
import {ObservableWrapper} from 'angular2/src/core/facade/async';
|
||||
|
||||
@Component({
|
||||
selector: 'zippy',
|
||||
properties: ['title'],
|
||||
events: ['openHandler: open', 'closeHandler: close']
|
||||
})
|
||||
@Component(
|
||||
{selector: 'zippy', inputs: ['title'], outputs: ['openHandler: open', 'closeHandler: close']})
|
||||
@View({templateUrl: 'zippy.html'})
|
||||
export class Zippy {
|
||||
visible: boolean = true;
|
||||
|
||||
Reference in New Issue
Block a user