# Can-stache-bindings and removeAttr

**URL:** <https://forums.bitovi.com/t/can-stache-bindings-and-removeattr/787>\
**Category:** CanJS\
**Created:** [December 21, 2017, 2:18pm UTC](https://forums.bitovi.com/t/can-stache-bindings-and-removeattr/787 "2017-12-21T14:18:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![BairDev](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.bitovi.com/bairdev/32/295_2.png) [@BairDev](https://forums.bitovi.com/u/BairDev)\
**Post date:** [December 21, 2017, 2:18pm UTC](https://forums.bitovi.com/t/can-stache-bindings-and-removeattr/787/1 "2017-12-21T14:18:56Z")

</div>

The [documentation](https://canjs.com/doc/can-map.prototype.removeAttr.html) says, that using `removeAttr` let the change event and the attribute event be fired for can-maps.

Does the same happens, if the attribute is bound (one way!) to a parent compenent or - in other words - is a change event also fired for the attribute of the model of the parent compenent, to which the former property is bound to?

Suppose a binding like this: `vm:someProperty:to="parentKey"`. Both attributes exist in the view models and I’m listening for events for `parentKey` in the parent component.

The whole set-up is somehow similar to this [JSFiddle](https://jsfiddle.net/bair_web/ernycgr8/).

---

<div class="post-metadata">

**Author:** ![justinbmeyer](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.bitovi.com/justinbmeyer/32/179_2.png) [@justinbmeyer](https://forums.bitovi.com/u/justinbmeyer)\
**Post date:** [December 21, 2017, 2:31pm UTC](https://forums.bitovi.com/t/can-stache-bindings-and-removeattr/787/2 "2017-12-21T14:31:46Z")

</div>

The parent’s value will be set to `undefined`, it will not be deleted.

---

<div class="post-metadata">

**Author:** ![BairDev](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.bitovi.com/bairdev/32/295_2.png) [@BairDev](https://forums.bitovi.com/u/BairDev)\
**Post date:** [January 12, 2018, 1:57pm UTC](https://forums.bitovi.com/t/can-stache-bindings-and-removeattr/787/3 "2018-01-12T13:57:50Z")

</div>

Sorry for the late response, but according to my experiences and like it is [shown in this fiddle,](https://jsfiddle.net/bair_web/ernycgr8/) the parent value is left as it is. There is also - obviously in that case - no change event for the value in the parent component.

As a reminder: I’m using `removeAttr` for an attribute in a child component, which is bound (one way!) to an attribute in a parent component. This does not change the value of this attribute in the parent comp at all. Am I doing something wrong?

---

<div class="post-metadata">

**Author:** ![justinbmeyer](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.bitovi.com/justinbmeyer/32/179_2.png) [@justinbmeyer](https://forums.bitovi.com/u/justinbmeyer)\
**Post date:** [January 18, 2018, 11:36pm UTC](https://forums.bitovi.com/t/can-stache-bindings-and-removeattr/787/4 "2018-01-18T23:36:05Z")

</div>

this smells like a bug. Can you create an issue in can-stache-bindings?

---

<div class="post-metadata">

**Author:** ![BairDev](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.bitovi.com/bairdev/32/295_2.png) [@BairDev](https://forums.bitovi.com/u/BairDev)\
**Post date:** [January 24, 2018, 8:29am UTC](https://forums.bitovi.com/t/can-stache-bindings-and-removeattr/787/5 "2018-01-24T08:29:59Z")

</div>

Sure and [done](https://github.com/canjs/can-stache-bindings/issues/399).
