This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var EVENTS = 'fetch change destroy'; | |
var args = arguments || {}; | |
// remove existing bindings to prevent unexpected behavior and memory leaks | |
$.user.off(EVENTS); | |
// add bindings to new model | |
args.user.on(EVENTS, function() { | |
$.name.text = args.user.get('name'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var test = require('com.test'); | |
... | |
var testTwo = test.init(); | |
var realView = testTwo.createView(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.index.open(); | |
function doClick(e) { | |
Ti.API.info(JSON.stringify(e)); | |
} | |
var library = Alloy.Collections.book; | |
library.fetch(); | |
Ti.API.info(JSON.stringify(library)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.hide.addEventListener("click", function(e) { | |
// don't create a new instance, use the one the markup creates for you | |
// you when you use the <Require> tag. | |
// | |
// var views = Alloy.createController("views"); | |
// views.hide(); | |
$.views.hide(); | |
}); |