# Controller 'needs' property deprecation

**URL:** <https://discuss.emberjs.com/t/controller-needs-property-deprecation/8329>\
**Category:** Uncategorized\
**Created:** [July 7, 2015, 6:34pm UTC](https://discuss.emberjs.com/t/controller-needs-property-deprecation/8329 "2015-07-07T18:34:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![joseph\_dillon\_522](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/joseph_dillon_522/32/9348_2.png) [@joseph\_dillon\_522](https://discuss.emberjs.com/u/joseph_dillon_522)\
**Post date:** [July 7, 2015, 6:34pm UTC](https://discuss.emberjs.com/t/controller-needs-property-deprecation/8329/1 "2015-07-07T18:34:47Z")

</div>

I noticed that the controller class’ `needs` property is now [deprecated](http://emberjs.com/api/classes/Ember.ControllerMixin.html#property_needs). When did this change occur? Also, it suggests using `Ember.inject.controller()` in its place. I cannot find this particular gem anywhere in the API or guides yet. Even the guides still refer to `needs` when [talking about dependency injection](http://guides.emberjs.com/v1.12.0/understanding-ember/dependency-injection-and-service-lookup/).

With that said, how do I use `Ember.inject.controller()`.

---

<div class="post-metadata">

**Author:** ![neojp](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/neojp/32/15934_2.png) [@neojp](https://discuss.emberjs.com/u/neojp)\
**Post date:** [July 8, 2015, 2:51am UTC](https://discuss.emberjs.com/t/controller-needs-property-deprecation/8329/2 "2015-07-08T02:51:52Z")

</div>

Documentation is a bit scarse, but it’s pretty easy to understand from the blog post where they mention it. It’s strange they don’t mention the controller injection though.

> **[Ember.js 1.10.0 and 1.11 Beta Released](https://blog.emberjs.com/ember-1-10-0-released/)**
>
> We are pleased to announce the release of both Ember.js 1.10.0 and the first beta in the 1.11 series. This comes as the tenth cycle of our release process...

[http://emberjs.com/api/classes/Ember.inject.html#method\_service](http://emberjs.com/api/classes/Ember.inject.html#method_service)

From `needs`:

```auto
needs: ['application'],
application: Ember.computed.alias('controllers.application')

```

To `inject`:

```auto
application: Ember.inject.controller()

```

You can also create aliases by adding the controller name into the method call:

```auto
appController: Ember.inject.controller('application')

```

It’s worth noting that you can only inject controllers inside a controller; and they will also be deprecated once routable components become stable.

---

<div class="post-metadata">

**Author:** ![jasonmit](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/jasonmit/32/182_2.png) [@jasonmit](https://discuss.emberjs.com/u/jasonmit)\
**Post date:** [July 8, 2015, 3:50am UTC](https://discuss.emberjs.com/t/controller-needs-property-deprecation/8329/3 "2015-07-08T03:50:11Z")

</div>

[Ember - 4.6 - Ember API Documentation](http://emberjs.com/api/classes/Ember.inject.html#method_controller) it’s there except oddly marked as private… 😑
