I have a "container" component that handles all of the component creation/removals dynamically in my app.
If the attribute sharedAttribute
exists on both the parent and child component then using it like this:
<c:childObject sharedAttribute="{!v.sharedAttribute}"/>
should reflect changes on the parent object if the attribute is set on the child object.
However, if I create the child object dynamically like this:
$A.createComponent(
"c:childObject",
{
"sharedAttribute" : cmp.get("v.sharedAttribute")
},
function(newCmp){
//do stuff
}
});
Then changes arent reflected on the parent component when the child component is updated.
Where did I go wrong?