an></code></pre></div>
<p>Once injected into a component, a service can also be used in the template.
Note <code>cart</code> being used below to get data from the cart.</p>
<div class="filename handlebars"><div class="ribbon"></div><span>app/components/cart-contents.hbs</span><pre class="language-handlebars line-numbers"><code class="handlebars language-handlebars"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>ul</span><span class="token punctuation">></span></sp