FrontEndTech
  • Introduction
  • ReactJS
    • Ecosystem
    • Refactor Using Functional Decomposition and Reducer Composition
  • AngularJS
    • installation
    • File structure
    • CLI
      • ng g
    • Fundamentals
      • Component
        • Lifecycle
        • Template
      • Decorations
      • Service
      • Pipe
      • Directives
        • NgClass
        • NgStyle
        • NgModel
        • Customized Attribute Directives
        • NgIf
        • NgFor
        • NgSwitch
        • NgForm
        • Customized Structural Directives
      • Module
        • Routing
    • Bindings
      • Property Binding
      • Event Binding
      • Data Binding
      • Attribute Binding
      • Class Binding
      • Style Binding
    • Forms
      • Reactive Form
      • Reactive vs Template
    • build
Powered by GitBook
On this page
  • Binding types - by the direction of data flow
  • Binding Types - Target
  • HTML attributes & DOM properties

Was this helpful?

  1. AngularJS

Bindings

PreviousRoutingNextProperty Binding

Last updated 5 years ago

Was this helpful?

Binding types - by the direction of data flow

Binding types can be grouped into three categories distinguished by the direction of data flow:

  • source-to-view ( [ ], bind- )

  • view-to-source ( (), on- )

  • view-to-source-to-view ( [()], bindon- )

The target name is the name of a property. It may look like the name of an attribute but it never is.

Binding Types - Target

HTML attributes & DOM properties

Attributes are defined by HTML. Properties are defined by the DOM (Document Object Model).

  • A few HTML attributes have 1:1 mapping to properties. id is one example.

  • Some HTML attributes don't have corresponding properties. colspan is one example.

  • Some DOM properties don't have corresponding attributes. textContent is one example.

  • Many HTML attributes appear to map to properties

HTML Attributes initialize DOM properties and then they are done. DOM Property values can change; HTML attribute values can't.