List<String> inputs
read-only

Enumerates the set of data-bound input properties for a directive

Angular automatically updates input properties during change detection.

The inputs property defines a set of directiveProperty to bindingProperty configuration:

  • directiveProperty specifies the component property where the value is written.

  • bindingProperty specifies the DOM property where the value is read from.

When bindingProperty is not provided, it is assumed to be equal to directiveProperty.

The following example creates a component with two data-bound properties.

@Component(
  selector: 'bank-account',
  inputs: const ['bankName', 'id: account-id'],
  template: '''
    Bank Name: {{bankName}}
    Account Id: {{id}}
  ''')
class BankAccount {
  String bankName, id;
 
  // This property is not bound, and won't be automatically updated by
  // Angular
  String normalizedBankName;
}
 
@Component(
  selector: 'app',
  template: '''
    <bank-account bank-name="RBC" account-id="4747"></bank-account>
  ''',
  directives: const [BankAccount])
class App {}