Last active
October 13, 2019 17:40
-
-
Save siddharthpal/7c034ed1c3ff43deefce8fc9838ade5e to your computer and use it in GitHub Desktop.
Wrapping @input method inside ngZone run method
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
@Input() public pushTodoItem = todo => { | |
this.ngZone.run(() => { | |
this.todos.push(todo); | |
}); | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment