Skip to content

Instantly share code, notes, and snippets.

@rjmccluskey
Last active May 27, 2016 00:14
Show Gist options
  • Save rjmccluskey/931dcb5ee106370eb57f64bf93296714 to your computer and use it in GitHub Desktop.
Save rjmccluskey/931dcb5ee106370eb57f64bf93296714 to your computer and use it in GitHub Desktop.
Manipulate Angular 2 Input on change with setter
@Component({
selector: 'example-component'
})
export class ExampleComponent {
@Input() set myInput(newValue: string) {
// now you can do stuff here whenever the input is changed!
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment