# How to replace Ember.ArrayController

**URL:** <https://discuss.emberjs.com/t/how-to-replace-ember-arraycontroller/8502>\
**Category:** Uncategorized\
**Created:** [August 4, 2015, 9:07am UTC](https://discuss.emberjs.com/t/how-to-replace-ember-arraycontroller/8502 "2015-08-04T09:07:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![xudaiqing](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/xudaiqing/32/10543_2.png) [@xudaiqing](https://discuss.emberjs.com/u/xudaiqing)\
**Post date:** [August 4, 2015, 9:07am UTC](https://discuss.emberjs.com/t/how-to-replace-ember-arraycontroller/8502/1 "2015-08-04T09:07:36Z")

</div>

What is the correct way to achieve this without Ember.ArrayController?

> **[Ember Twiddle](https://ember-twiddle.com/#/cbd9bf9bd20ca12f0f76)**
>
> A web-based Ember.js code sharing tool that follows ember-cli's conventions.

I know i can use normal js array and triger rerender manual or use Ember.Controller plus mixins to recreate Ember.ArrayController.

But all of them feels hacky,

---

<div class="post-metadata">

**Author:** ![xudaiqing](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/xudaiqing/32/10543_2.png) [@xudaiqing](https://discuss.emberjs.com/u/xudaiqing)\
**Post date:** [August 4, 2015, 2:40pm UTC](https://discuss.emberjs.com/t/how-to-replace-ember-arraycontroller/8502/2 "2015-08-04T14:40:11Z")

</div>

Seems like i could use Ember.A().

> **[Ember Twiddle](https://ember-twiddle.com/#/3392df77084824f64396)**
>
> A web-based Ember.js code sharing tool that follows ember-cli's conventions.

The only problem is, although it has been there for a very long time, i can’t find it any where in the guides. Should i use it?

---

<div class="post-metadata">

**Author:** ![nullnullnull](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/nullnullnull/32/11169_2.png) [@nullnullnull](https://discuss.emberjs.com/u/nullnullnull)\
**Post date:** [August 4, 2015, 7:21pm UTC](https://discuss.emberjs.com/t/how-to-replace-ember-arraycontroller/8502/3 "2015-08-04T19:21:05Z")

</div>

If you return an array from the route’s model hook, Ember is smart enough to set things up properly. You’ll be able to access the array within your controller with a simple `this.model` and within your template with `model`. Using Ember.A() is also a perfectly sound approach. You can read about it [here](http://emberjs.com/api/classes/Ember.html#method_A).

---

<div class="post-metadata">

**Author:** ![xudaiqing](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/xudaiqing/32/10543_2.png) [@xudaiqing](https://discuss.emberjs.com/u/xudaiqing)\
**Post date:** [August 5, 2015, 12:20am UTC](https://discuss.emberjs.com/t/how-to-replace-ember-arraycontroller/8502/4 "2015-08-05T00:20:39Z")

</div>

Problem with return a array from model hook is i can’t find a proper way to update display after modify it. The only way i find to make it work is call rerender in the component manually.

---

<div class="post-metadata">

**Author:** ![Gaurav0](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/gaurav0/32/4704_2.png) [@Gaurav0](https://discuss.emberjs.com/u/Gaurav0)\
**Post date:** [August 5, 2015, 1:06pm UTC](https://discuss.emberjs.com/t/how-to-replace-ember-arraycontroller/8502/5 "2015-08-05T13:06:23Z")

</div>

@xudaiqing [Ember Twiddle](http://ember-twiddle.com/d5b54c466c482a772b50)

---

<div class="post-metadata">

**Author:** ![xudaiqing](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/xudaiqing/32/10543_2.png) [@xudaiqing](https://discuss.emberjs.com/u/xudaiqing)\
**Post date:** [August 5, 2015, 2:35pm UTC](https://discuss.emberjs.com/t/how-to-replace-ember-arraycontroller/8502/6 "2015-08-05T14:35:41Z")

</div>

So native array already extend to have what Ember.A() give.

seems like i just missed [http://guides.emberjs.com/v1.13.0/configuring-ember/disabling-prototype-extensions/](http://guides.emberjs.com/v1.13.0/configuring-ember/disabling-prototype-extensions/)
