How can I set a dynamic binding?


#1

I need to set up a relationship inside one of my controllers that will depend on what type it is.

For example I have an EntityListController and an EntityController. I’m extending these with concrete classes but I’d like to bind an attribute inside the EntityController to a property in the EntityListController. The binding could be anything like, controllers.gameList.fields or controllers.userList.fields depending on the type passed.


#2

Ember offers defineProperty and addObserver, which may be what you’re looking for. I recently investigated a similar question. Unfortunately there are too many ways to approach such unspecific problems as the one you describe.