# Deprecated Views

**URL:** <https://discuss.emberjs.com/t/deprecated-views/8850>\
**Category:** Uncategorized\
**Created:** [September 26, 2015, 5:42am UTC](https://discuss.emberjs.com/t/deprecated-views/8850 "2015-09-26T05:42:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tsatsmt](https://avatars.discourse-cdn.com/v4/letter/t/ebca7d/32.png) [@tsatsmt](https://discuss.emberjs.com/u/tsatsmt)\
**Post date:** [September 26, 2015, 5:42am UTC](https://discuss.emberjs.com/t/deprecated-views/8850/1 "2015-09-26T05:42:43Z")

</div>

Upgrading from Ember 1.8 to 1.13.10. Have a view that does below

```
export default Ember.View.extend({
    willInsertElement : function () {
    this.get("controller").send ("show", true);
  },

  willDestroyElement : function () {
    this.get("controller").send ("show", false);
  },
});

```

How can I remove the view to fix the deprecation warnings?

I thought of creating a component and adding that to the corresponding template, but nothing happens. The component methods do not get called.

```
export default Ember.Component.extend({
  willInsertElement : function () {
    this.sendAction("show", true);
  },

  willDestroyElement : function () {
    this.sendAction("show", false);
  }
});

```

When adding to the template, do I have to pass specific actions? I tried calling it like this.

```
<activity-container><!--some html here--></activity-container>

```

Thanks in advance.

---

<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:** [September 26, 2015, 6:26am UTC](https://discuss.emberjs.com/t/deprecated-views/8850/2 "2015-09-26T06:26:38Z")

</div>

```nohighlight
{{#activity-container}}
<!-- markup you want to yield -->
{{/activity-container}}

```

Instantiating component via arrow syntax hasn’t landed yet.

---

<div class="post-metadata">

**Author:** ![tsatsmt](https://avatars.discourse-cdn.com/v4/letter/t/ebca7d/32.png) [@tsatsmt](https://discuss.emberjs.com/u/tsatsmt)\
**Post date:** [September 26, 2015, 7:03am UTC](https://discuss.emberjs.com/t/deprecated-views/8850/3 "2015-09-26T07:03:35Z")

</div>

Thanks for your response. Its a progress, but still not working. It calls the willInsertElement, but then dies. and does not even call the willDestroyElement. In the debugger I see that if fails in this.sendAction(“show”, true); further going into that call, it finds actionName as undefined.

```
actionName = _emberMetalProperty_get.get(this, 'attrs.' + action) || _emberMetalProperty_get.get(this, action);
      actionName = validateAction(this, actionName);

      // If no action name for that action could be found, just abort.
      if (actionName === undefined) {
        return;
      }

```

I tried passing action=“show”, and that didn’t help either.

Also I had another developer use the arrow syntax and it is working, so not sure why mine is not.

---

<div class="post-metadata">

**Author:** ![tsatsmt](https://avatars.discourse-cdn.com/v4/letter/t/ebca7d/32.png) [@tsatsmt](https://discuss.emberjs.com/u/tsatsmt)\
**Post date:** [September 26, 2015, 7:09am UTC](https://discuss.emberjs.com/t/deprecated-views/8850/4 "2015-09-26T07:09:45Z")

</div>

Actually, seems I found what was missing.

I updated the component as below and it called both methods. {{#activity-container class=“page” **show=“show”** }}

Thanks a bunch again for your help.

---

<div class="post-metadata">

**Author:** ![sheriffderek](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/sheriffderek/32/10619_2.png) [@sheriffderek](https://discuss.emberjs.com/u/sheriffderek)\
**Post date:** [September 26, 2015, 7:21am UTC](https://discuss.emberjs.com/t/deprecated-views/8850/5 "2015-09-26T07:21:37Z")

</div>

Those angle bracket component syntax will be what you can use in the future though - so good guess.
