Skip to content

Instantly share code, notes, and snippets.

@anthonybrown
Forked from anonymous/component.html
Created March 21, 2014 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anthonybrown/9690055 to your computer and use it in GitHub Desktop.
Save anthonybrown/9690055 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>MFiddle</title>
<script type="text/montage-serialization">{
"owner": {
"properties": {
"element": {"#": "component"}
}
},
"toggle": {
"prototype": "digit/ui/checkbox.reel",
"properties": {
"element": {"#": "toggle"},
"checked": true
}
},
"hideBlockCondition": {
"prototype": "montage/ui/condition.reel",
"properties": {
"element": {"#": "block"}
},
"bindings": {
"condition": {"<-": "@toggle.checked"}
}
}
}</script></head>
<body>
<div data-montage-id="component">
<label><input type="checkbox" data-montage-id="toggle">Show</label>
<div data-montage-id="block">
<h2>Hello, it's just me.</h2>
<h2>Am I the one you're looking for?</h2>
</div>
</div>
</body>
</html>
var Component = require("montage/ui/component").Component;
exports.Owner = Component.specialize({
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment