title: Accessing Directive attribute value inside the Template
body: <p>I have created a directive that is included in the html as follow:</p>
  
  <pre><code>&lt;w3-test-directive id="first" url="tableParams" sql="select *from     table1"&gt;&lt;/w3-test-directive&gt;
  
  &lt;w3-test-directive id="second" url="tableParams2" sql="select *from     table2"&gt;&lt;/w3-test-directive&gt;
  </code></pre>
  
  <p>Now in my directive Template i want the value of attribute id.
  How can I get that?</p>
  
  <p>My template is as follow:</p>
  
  <pre><code>template: [
                      '&lt;p&gt;The attribute value is {{value of id attribute}}&lt;p&gt;'
  ]
  </code></pre>
  
  <p>so the template would look some thing like this:</p>
  
  <pre><code> "&lt;p&gt;The attribute value is first&lt;p&gt;"
  </code></pre>