Currently the properties, (and somewhat events) in @Directive take a Map rather then an Array.
The argument for an list rather then a map, is that most of the time we should not be renaming the properties, which creates a lists such as these:
{
'title': 'title',
'name': 'name',
'nickname': 'nick',
'age': 'age'
}
These are necessarily wordy! In addition it is hard to spot the renames. Did you notice it? Instead we should have this syntax:
['title', 'name', 'nickname <= nick', 'age']
This syntax is less wordy, and it makes the renames very explicit. It also encourages developers to keep the renames to a minimum.
This should apply to both: properties and events
Currently the
properties, (and somewhatevents) in@Directivetake aMaprather then anArray.The argument for an list rather then a map, is that most of the time we should not be renaming the properties, which creates a lists such as these:
These are necessarily wordy! In addition it is hard to spot the renames. Did you notice it? Instead we should have this syntax:
This syntax is less wordy, and it makes the renames very explicit. It also encourages developers to keep the renames to a minimum.
This should apply to both:
propertiesandevents