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
@ -7,11 +7,11 @@ import {Math} from 'angular2/src/facade/math';
|
||||
selector: 'md-progress-linear',
|
||||
lifecycle: [onChange],
|
||||
properties: ['value', 'bufferValue'],
|
||||
hostProperties: {
|
||||
'role': 'attr.role',
|
||||
'ariaValuemin': 'attr.aria-valuemin',
|
||||
'ariaValuemax': 'attr.aria-valuemax',
|
||||
'value': 'attr.aria-valuenow'
|
||||
host: {
|
||||
'[attr.role]': 'role',
|
||||
'[attr.aria-valuemin]': 'ariaValuemin',
|
||||
'[attr.aria-valuemax]': 'ariaValuemax',
|
||||
'[attr.aria-valuenow]': 'value'
|
||||
}
|
||||
})
|
||||
@View({
|
||||
|
Reference in New Issue
Block a user