# Observing \`ContainerView\` as an array

**URL:** <https://discuss.emberjs.com/t/observing-containerview-as-an-array/7455>\
**Category:** Design\
**Created:** [March 6, 2015, 10:25pm UTC](https://discuss.emberjs.com/t/observing-containerview-as-an-array/7455 "2015-03-06T22:25:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![clem](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/clem/32/15364_2.png) [@clem](https://discuss.emberjs.com/u/clem)\
**Post date:** [March 6, 2015, 10:25pm UTC](https://discuss.emberjs.com/t/observing-containerview-as-an-array/7455/1 "2015-03-06T22:25:09Z")

</div>

Is there a practical alternative to observing `ContainerView` as an array? I need to manually manage an array of views, and some of those views have properties based off of their position within their parent, for example:

```javascript
number: function getNumber() {
  return `Number ${this.get('parentView').indexOf(this)}: `;
}.property('parentView.[]')

```

I’m getting deprecation warnings, but am not aware of an alternative.

---

<div class="post-metadata">

**Author:** ![varblob](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/varblob/32/10304_2.png) [@varblob](https://discuss.emberjs.com/u/varblob)\
**Post date:** [March 8, 2015, 1:54pm UTC](https://discuss.emberjs.com/t/observing-containerview-as-an-array/7455/2 "2015-03-08T13:54:28Z")

</div>

I guess the new fangled way would be to switch your views to components and pass in the parental index data.

Using the awesomeness of [each with index](http://emberjs.com/blog/2015/02/07/ember-1-10-0-released.html#toc_each-with-index) you could do something like

```
{{#each people as |person index|}}
  {{! The first index value will be 0 }}
  {{your-awesome-component position=index}}
{{/each}}

```

---

<div class="post-metadata">

**Author:** ![clem](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/clem/32/15364_2.png) [@clem](https://discuss.emberjs.com/u/clem)\
**Post date:** [March 9, 2015, 7:02pm UTC](https://discuss.emberjs.com/t/observing-containerview-as-an-array/7455/3 "2015-03-09T19:02:42Z")

</div>

Ah, good call. I’ll give this a whirl.
