I am trying to understand OnInit functionality in angular2 and read the documentation:
Description
Implement this interface to execute cu
@Input is a decorator that makes a class field as an input property and supplies configuration metadata. The input property is bound to a DOM property in the template. During change detection, Angular automatically updates the data property with the DOM property's value.
I hope this answer may help to understand this concept.
Above example contains name as an input which is bound as property for component in DOM structure & angular updates it based on changes.