title: Angular2 Get data from HTML data- attribute to component
body: <p>I have issue with getting data from HTML data attr to component. </p>
  
  <p>In Template I have:</p>
  
  <pre><code>&lt;button [attr.data-direction]="next" type="text" (click)="nextNotes()" [disabled]="checkPage(paginator)"&gt; &gt; &lt;/button&gt;
  </code></pre>
  
  <p>And how can I call this data attr in class method after click? There is some ng workflow for that or purejs?</p>
  
  <pre><code>console.log(data)
  </code></pre>