title: How to detect that a bound property's value has changed in angular 4
body: <p>This is how you detect that a property decorated with @Input has changed:</p>
  
  <pre><code>export class EmployeeComponent implements OnChanges {
    @Input() message: string;
    startDate: Date;
  
    ngOnChanges(changes: SimpleChanges) {
       for (let propName in changes) {  
          let change = changes[propName];
          if (propName === 'message') {
            //do something...
          }
       }
    }
  }
  </code></pre>
  
  <p>Here's the markup </p>
  
  <pre><code>&lt;app-date-picker [(model)]="startDate"&gt;&lt;/app-date-picker&gt;
  </code></pre>
  
  <p><em>startDate</em> is not decorated by <code>@Input</code>, but I'd like to do something if the value of startDate changes.</p>
  
  <p>Thanks for helping</p>