ng-attr where the attribute has a dash <p>I need to use angular to evaluate an attribute value. The catch is that this attribute value has a dash (-).</p> <p>In short, I need:</p> <pre><code>&lt;div ng-attr-my-attribute="{{5+5}}"&gt;&lt;/div&gt; </code></pre> <p>To render into:</p> <pre><code>&lt;div my-attribute="10"&gt;&lt;/div&gt; </code></pre> <p>What actually happens is the DOM just shows this verbatim:</p> <pre><code>&lt;div ng-attr-my-attribute="{{5+5}}"&gt;&lt;/div&gt; </code></pre> <p>I feel like I need to use ng-attr because when I don't, for example:</p> <pre><code>&lt;div my-attribute="{{5+5}}"&gt;&lt;/div&gt; </code></pre> <p>renders exactly as:</p> <pre><code>&lt;div my-attribute="{{5+5}}"&gt;&lt;/div&gt; </code></pre> <p>Using angular 1.4.1</p> <p>Question: How to use <code>ng-attr</code> with an attribute that has a dash in it? </p>