How do you reference controllers from other controllers?

You must Login before you can answer or comment on any questions.

I understand how you can use Alloy.createController('name') to initialize an instance of a controller, but is there a built in way to reference a controller already initialized?

3 Answers

Accepted Answer

Hi Geoff, there is no global access to controller windows, however you can pass the controller object (reference) around and use it to access exported functions. If this sound like what you want to do see the test/apps/basic/multiple_views for a simple sample.

you would need to save it in a variable somewhere.... or pass it into the new object.

no different than you would treat any other object

Your Answer

Think you can help? Login to answer this question!