When does Alloy model initialized?

167 views Asked by At

I'm sure that Alloy collection is initialized first before the model. But I'm not sure when does this initialization starts.

  1. Is it after running alloy.js, index.js, or some other .js file?
  2. Is it before the first window opens, or after?
  3. Is there a way to force call the initialization process so I can make sure that the initialization happens at the start of index.js?
1

There are 1 answers

0
Shawn On

You initialize collections or models yourself.

Through js: calling Alloy.createModel(), Alloy.createCollection(), Alloy.Models.instance() or Alloy.Collections.instance()

Through markup: using <Model /> or <Collection /> tag

docs here