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:
vsavkin
2015-09-30 20:59:23 -07:00
parent 33593cf8a2
commit adbfd29fd7
89 changed files with 405 additions and 423 deletions

View File

@ -49,7 +49,7 @@ export class MdButton {
@Component({
selector: 'a[md-button], a[md-raised-button], a[md-fab]',
properties: ['disabled'],
inputs: ['disabled'],
host: {
'(click)': 'onClick($event)',
'(mousedown)': 'onMousedown()',

View File

@ -6,7 +6,7 @@ import {NumberWrapper} from 'angular2/src/core/facade/lang';
@Component({
selector: 'md-checkbox',
properties: ['checked', 'disabled'],
inputs: ['checked', 'disabled'],
host: {
'role': 'checkbox',
'[attr.aria-checked]': 'checked',

View File

@ -27,7 +27,7 @@ class RowHeightMode {
}
@Component({selector: 'md-grid-list', properties: ['cols', 'rowHeight', 'gutterSize']})
@Component({selector: 'md-grid-list', inputs: ['cols', 'rowHeight', 'gutterSize']})
@View({
templateUrl: 'package:angular2_material/src/components/grid_list/grid_list.html',
encapsulation: ViewEncapsulation.None
@ -214,7 +214,7 @@ export class MdGridList implements AfterContentChecked {
@Component({
selector: 'md-grid-tile',
properties: ['rowspan', 'colspan'],
inputs: ['rowspan', 'colspan'],
host: {
'role': 'listitem',
'[style.height]': 'style.height',

View File

@ -65,7 +65,7 @@ export class MdInputContainer implements AfterContentChecked {
@Directive({
selector: 'md-input-container input',
events: ['mdChange', 'mdFocusChange'],
outputs: ['mdChange', 'mdFocusChange'],
host: {
'class': 'md-input',
'(input)': 'updateValue($event)',

View File

@ -21,7 +21,7 @@ class ProgressMode {
@Component({
selector: 'md-progress-linear',
properties: ['value', 'bufferValue'],
inputs: ['value', 'bufferValue'],
host: {
'role': 'progressbar',
'aria-valuemin': '0',

View File

@ -35,8 +35,8 @@ var _uniqueIdCounter: number = 0;
@Component({
selector: 'md-radio-group',
events: ['change'],
properties: ['disabled', 'value'],
outputs: ['change'],
inputs: ['disabled', 'value'],
host: {
'role': 'radiogroup',
'[attr.aria-disabled]': 'disabled',
@ -192,7 +192,7 @@ export class MdRadioGroup implements OnChanges {
@Component({
selector: 'md-radio-button',
properties: ['id', 'name', 'value', 'checked', 'disabled'],
inputs: ['id', 'name', 'value', 'checked', 'disabled'],
host: {
'role': 'radio',
'[id]': 'id',

View File

@ -6,7 +6,7 @@ import {MdCheckbox} from "../checkbox/checkbox";
@Component({
selector: 'md-switch',
properties: ['checked', 'disabled'],
inputs: ['checked', 'disabled'],
host: {
'role': 'checkbox',
'[attr.aria-checked]': 'checked',