Search code examples
angulartypescriptangular-uiangular2-components

Angular2 - Component based architecture


Custom property is used for data binding across components.

          <section id="main">
              <app-home [dict]="dict">Hello there!</app-home>
          </section>

here, dict is a custom property, where app-home is selector of one component used in other component.


The idea of components in Angular2 is to be highly cohesive and loosely coupled.


Why angular2 allow data binding across components?


Solution

  • Passing data from parent to child with input binding is main approach for component interaction.In summary this is required by development.