Skip to content

Convert properties in @Component/@Directive to Arrays #2013

@mhevery

Description

@mhevery

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions