ontrollers (via <code>import { inject } from '@ember/controller';</code>)
and services (via <code>import { inject } from '@ember/service';</code>).</p>
<p>The following code injects the <code>shopping-cart</code> service on the <code>cart-contents</code> component as the property <code>cart</code>:</p>
<div class="filename javascript"><div class="ribbon"></div><span>app/components/cart-contents.js</span><pre class="language-javascript line-numbers"><code class="javascript language-javascript"><span class="t