title: Combine linkTo and action helpers in Ember.js
body: <p>I need to combine linkTo and action helpers in Ember.js. My code is:</p>
  
  <pre><code>{{#link-to 'index'}}&lt;span {{action 'clear'}}&gt;Clear&lt;/span&gt;{{/link-to}}
  </code></pre>
  
  <p>But I would like to make this something like this:</p>
  
  <pre><code>{{#link-to 'index' {{action 'clear'}} }}Clear{{/link-to}}
  </code></pre>
  
  <p>And also:</p>
  
  <pre><code>&lt;li&gt;
      {{#link-to 'support'}}
          &lt;span {{action 'myAction' 'support'}}&gt;Support&lt;/span&gt;
      {{/link-to}}
  &lt;/li&gt;
  </code></pre>
  
  <p>To:</p>
  
  <pre><code>&lt;li&gt;
      {{#link-to 'support' {{action 'myAction' 'support'}} }}Support{{/link-to}}
  &lt;/li&gt;
  </code></pre>
  
  <p>How can I achieve this?</p>
  
  <h1>Solution</h1>
  
  <p><a href="https://stackoverflow.com/a/32871262/2166409">Check my answer for <strong>Ember 2.0 compatible</strong>, <strong>OK for SEO solution</strong>.</a></p>