-
-
Save tonylukasavage/3724810 to your computer and use it in GitHub Desktop.
exports.* does not effect on-screen elements
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(); | |
}); | |
$.index.open(); |
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
<Alloy> | |
<Window class="container"> | |
<Require src="views" id="views"/> | |
<Button id="hide">Hide The View</Button> | |
</Window> | |
</Alloy> |
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
// Would hide the 'theView' button | |
$.theView.addEventListener("click", function() { $.theView.hide(); }); | |
// Would *NOT* hide the 'theView' button | |
exports.hide = function() { $.theView.hide(); }; |
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
<Alloy> | |
<View class="container"> | |
<Button id="theView">The View</Button> | |
</View> | |
</Alloy> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment