Execution Sequence Alloy MVC #13040
-
If I run the following example, then
views/index.xml
views/tab1.xml
controllers/tab1.js
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@beppo-ivel, any code at the top level of the controller will be executed when If you want to delay something until tab1 is actually open, you can use the |
Beta Was this translation helpful? Give feedback.
@beppo-ivel, any code at the top level of the controller will be executed when
Alloy.createController
is called. If you open up the compile Classic source atResources/<platform>/alloy/controllers/index.js
, you can see that the tab1 instance is created (executing the top level code), then the TabGroup is created, thenaCustomPromise
is called.If you want to delay something until tab1 is actually open, you can use the
onOpen
event handler. That should give you the flow I believe you're expecting