Last active
May 27, 2016 00:14
-
-
Save rjmccluskey/931dcb5ee106370eb57f64bf93296714 to your computer and use it in GitHub Desktop.
Manipulate Angular 2 Input on change with setter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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