Q:

In Angular 2 how to get @Input value updated inside component?

on this example, SkillsSelectComponent receives input skills from a parent component. 
@Component({
  selector: 'skills-select',
  template: `{{ skills | json }}`
})
export class SkillsSelectComponent {

  @Input() skills;

  ngOnInit() {
    console.log('skills', this.skills);
  }
}

If skills change once the component has been created, {{skills }} inside template will be updated but how to detect change inside the component ?

A:

I used ngOnChanges 
ngOnChanges(changes: any): void {
    console.log('change', changes.skills.currentValue);
}

