Remember that Angular 2 is all about singular responsibility. No matter how small your component is, dedicate a separate logic for each and every component. Be it a button, a fancy anchor link, a dialog header or even a sidenav's sub item.
Getting started with Angular 2
Filter out table values by the input
This modified text is an extract of the original Stack Overflow Documentation created by following contributors
and released under CC BY-SA 3.0