Monday 15 August 2011

Titanium access a model from other controller -


I have learned how to use a model from another controller, var book = Alloy.Models.instance (' Book ');

And this is how to use the property of an ideal, var name = book.get ('name');

However in the console, the name log [INFO]: {}, which means that the value of its assets is not met, and the model model already has data saved on it already. Thanks for your help!

You may have to bring the archive first:

  Miscellaneous books = Mishra Selection. Book; Books.fetch ();   

This will load all the models from the collection so that you can use them.

No comments:

Post a Comment