Sometimes this.get("object.value") not working properly in ember.js. But this.get("object").value is working. Any reason?
this.get("object").value = "values" // WORKS ✅
this.get("object.value") = undefined // DOESN'T WORK
Sometimes this.get("object.value") not working properly in ember.js. But this.get("object").value is working. Any reason?
this.get("object").value = "values" // WORKS ✅
this.get("object.value") = undefined // DOESN'T WORK
Copyright © 2021 Jogjafile Inc.
Can you clarify "what isn't working"? what do you expect to happen? what does your data look like?
is
object.valueaccidentally a key with a dot in it? For example:get with
object1.valuewon't work because there is no key namedobject1Butobject2.valuewill work because there is a key namedobject2so, if you want to access properties with
.in the key, you'll need a custom method that does that (likely with square bracket access).for example: