Observing a property whose name is dynamic

Hi, I need to observe a property with a dynamic name (the name is computed from other properties).

functionName: Ember.observer("string" + this.get("name"), function(){ <snippet>})

unfortunately Ember can’t recognize “this” in the observer’s arguments.

I can’t find any references online regarding my use-case. Please help me on this!

Thank you.

Found a way to achieve this. I’ve used

Ember.addObserver((“string” + this.get(“name”)), this, this.callBack);

While it’s possible to add and remove observers dynamically, I definitely recommend against doing it, as observers are really non-performant and will eventually be removed from Ember. If you can provide some more details about what your observer does, I can try to help out with writing an alternative!