title: How to execute a funtion on @Input parameter in angularjs2?
body: <p>I wanted to execute doClean() function on @Input() cleanTextBox</p>
  
  <pre><code>    @Component({
        selector: 'my-component',
        providers: [],
        template: `&lt;input [(ngModel)]="abc"&gt;`,
        directives: []
      })
      export class Directive {
        @Input() cleanTextBox : boolean;
        public abc = "someValue";
  
       // Execute doClean function if cleanTextBox is true
         public doClean{
             this.abc = '';
         }
      }
  </code></pre>