Skip to content

Execution Sequence Alloy MVC #13040

Answered by ewanharris
beppo-ivel asked this question in Q&A
Discussion options

You must be logged in to vote

@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 at Resources/<platform>/alloy/controllers/index.js, you can see that the tab1 instance is created (executing the top level code), then the TabGroup is created, then aCustomPromise 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

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by beppo-ivel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants