feat(Directive): convert properties to an array
fixes #2013 BREAKING CHANGE: Before @Directive(properties: { 'sameName': 'sameName', 'directiveProp': 'elProp | pipe' }) After @Directive(properties: [ 'sameName', 'directiveProp: elProp | pipe' ])
This commit is contained in:
@ -11,7 +11,7 @@ export class MdButton {
|
||||
|
||||
@Component({
|
||||
selector: '[md-button][href]',
|
||||
properties: {'disabled': 'disabled'},
|
||||
properties: ['disabled'],
|
||||
hostListeners: {'click': 'onClick($event)'},
|
||||
hostProperties: {'tabIndex': 'tabIndex'},
|
||||
lifecycle: [onChange]
|
||||
|
@ -6,7 +6,7 @@ import {NumberWrapper} from 'angular2/src/facade/lang';
|
||||
|
||||
@Component({
|
||||
selector: 'md-checkbox',
|
||||
properties: {'checked': 'checked', 'disabled': 'disabled'},
|
||||
properties: ['checked', 'disabled'],
|
||||
hostListeners: {'keydown': 'onKeydown($event)'},
|
||||
hostProperties: {
|
||||
'tabindex': 'tabindex',
|
||||
|
@ -19,7 +19,7 @@ import {Math} from 'angular2/src/facade/math';
|
||||
|
||||
@Component({
|
||||
selector: 'md-grid-list',
|
||||
properties: {'cols': 'cols', 'rowHeight': 'row-height', 'gutterSize': 'gutter-size'},
|
||||
properties: ['cols', 'rowHeight', 'gutterSize'],
|
||||
lifecycle: [onAllChangesDone]
|
||||
})
|
||||
@View({templateUrl: 'angular2_material/src/components/grid_list/grid_list.html'})
|
||||
@ -217,7 +217,7 @@ export class MdGridList {
|
||||
|
||||
@Component({
|
||||
selector: 'md-grid-tile',
|
||||
properties: {'rowspan': 'rowspan', 'colspan': 'colspan'},
|
||||
properties: ['rowspan', 'colspan'],
|
||||
hostProperties: {
|
||||
'styleHeight': 'style.height',
|
||||
'styleWidth': 'style.width',
|
||||
|
@ -6,7 +6,7 @@ import {Math} from 'angular2/src/facade/math';
|
||||
@Component({
|
||||
selector: 'md-progress-linear',
|
||||
lifecycle: [onChange],
|
||||
properties: {'value': 'value', 'bufferValue': 'buffer-value'},
|
||||
properties: ['value', 'bufferValue'],
|
||||
hostProperties: {
|
||||
'role': 'attr.role',
|
||||
'ariaValuemin': 'attr.aria-valuemin',
|
||||
|
@ -26,7 +26,7 @@ var _uniqueIdCounter: number = 0;
|
||||
selector: 'md-radio-group',
|
||||
lifecycle: [onChange],
|
||||
events: ['change'],
|
||||
properties: {'disabled': 'disabled', 'value': 'value'},
|
||||
properties: ['disabled', 'value'],
|
||||
hostListeners: {
|
||||
// TODO(jelbourn): Remove ^ when event retargeting is fixed.
|
||||
'^keydown': 'onKeydown($event)'
|
||||
@ -186,8 +186,7 @@ export class MdRadioGroup {
|
||||
@Component({
|
||||
selector: 'md-radio-button',
|
||||
lifecycle: [onChange],
|
||||
properties:
|
||||
{'id': 'id', 'name': 'name', 'value': 'value', 'checked': 'checked', 'disabled': 'disabled'},
|
||||
properties: ['id', 'name', 'value', 'checked', 'disabled'],
|
||||
hostListeners: {'keydown': 'onKeydown($event)'},
|
||||
hostProperties: {
|
||||
'id': 'id',
|
||||
|
@ -8,7 +8,7 @@ import {NumberWrapper} from 'angular2/src/facade/lang';
|
||||
|
||||
@Component({
|
||||
selector: 'md-switch',
|
||||
properties: {'checked': 'checked', 'disabled': 'disabled'},
|
||||
properties: ['checked', 'disabled'],
|
||||
hostListeners: {'keydown': 'onKeydown($event)'},
|
||||
hostProperties:
|
||||
{'checked': 'attr.aria-checked', 'disabled_': 'attr.aria-disabled', 'role': 'attr.role'}
|
||||
|
Reference in New Issue
Block a user