how can I listen to changes in code in angular 2?
<p>I'm using angular 2. I have a component with an input.
I want to be able to write some code when the input value changes.
The binding is working, and if the data is changed (from outside the component) I can see that there is change in the dom.</p>

<pre><code>@Component({
    selector: 'test'
})
@View({
    template: `
    &lt;div&gt;data.somevalue={{data.somevalue}}&lt;/div&gt;`
})
export class MyComponent {

    _data: Data;
    @Input()
    set data(value: Data) {
        this.data = value;
    }
    get data() {
        return this._data;
    }

    constructor() {
    }

    dataChagedListener(param) {
        // listen to changes of _data object and do something...
    }
}
</code></pre>