hello guys
i want to close the current window using another controller, i am using it for Back option in ios devices
so i included the header controller inside each window , when the user click on the image Back , the current window shall be closed
this is my code
index.js
$.include_header.add(Alloy.createController('include_header',{"activity" : 'index','context': $}).getView());
header.js
var args = arguments[0] || {};
$.homeButton.addEventListener('click',function(e){
//we don't lunch twice sorry !
if( args.activity == 'index' )
{
return;
}else
{
args.context.close();
}
});
how i can make header.js able to close index.js ?