title: Angular 4 how to add (click) directive dependent on page component is used in
body: <p>I am just getting started with Angular 4 and I like the idea of discrete reusable components. I am trying to see if am also able to reduce the amount of repeated code that I write.</p>
  
  <p>As an example. Lets say I have a suppliers component, with a supplier-table.component.ts that provides a sortable and searchable table for my suppliers. I may want to include that table in different parts of my site, but depending on what page the user is on, I want to trigger a different function when the user clicks a supplier name.</p>
  
  <ul>
  <li><p>Supplier table on the find a PO page opens a list of suppliers PO's</p></li>
  <li><p>Supplier table on the find an invoice page opens a list of supplier Invoices.</p></li>
  </ul>