title: How to add attribute to button and access it at the global level in angular 2
body: <p>I want to add an attribute to a button like below</p>
  
  <pre><code>   &lt;button type="button" eventlistener (click)="toggleButton()"&gt;Toggle&lt;/button&gt;
  </code></pre>
  
  <p>I want to add some more logic at the global level for click event, is there anyway that whenever I add a button or any element by adding simple attribute I should be able to listen to them. I got this doubt after watching the code in angular 2 material as below:</p>
  
  <pre><code>&lt;button md-button&gt;Click me!&lt;/button&gt;
  </code></pre>
  
  <p>Using md-button attribute they have added few styles to the button. In the same way I want to add my custom functionality for my custom attribute. Please suggest.</p>