feat(Directive): Have a single Directive.host which mimics HTML
fixes #2268 BREAKING CHANGE: Before @Directive({ hostListeners: {'event': 'statement'}, hostProperties: {'expression': 'hostProp'}, hostAttributes: {'attr': 'value'}, hostActions: {'action': 'statement'} }) After @Directive({ host: { '(event)': 'statement', '[hostProp]': 'expression' // k & v swapped 'attr': 'value', '@action': 'statement' } })
This commit is contained in:
committed by
Tobias Bosch
parent
47b6b05017
commit
f3b49378e4
@@ -218,14 +218,14 @@ export class MdGridList {
|
||||
@Component({
|
||||
selector: 'md-grid-tile',
|
||||
properties: ['rowspan', 'colspan'],
|
||||
hostProperties: {
|
||||
'styleHeight': 'style.height',
|
||||
'styleWidth': 'style.width',
|
||||
'styleTop': 'style.top',
|
||||
'styleLeft': 'style.left',
|
||||
'styleMarginTop': 'style.marginTop',
|
||||
'stylePaddingTop': 'style.paddingTop',
|
||||
'role': 'role'
|
||||
host: {
|
||||
'[style.height]': 'styleHeight',
|
||||
'[style.width]': 'styleWidth',
|
||||
'[style.top]': 'styleTop',
|
||||
'[style.left]': 'styleLeft',
|
||||
'[style.marginTop]': 'styleMarginTop',
|
||||
'[style.paddingTop]': 'stylePaddingTop',
|
||||
'[role]': 'role'
|
||||
},
|
||||
lifecycle: [onDestroy, onChange]
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user