Created
March 15, 2015 13:34
-
-
Save anonymous/bb9f0a9c184856366972 to your computer and use it in GitHub Desktop.
title
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
<!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": {"#": "owner"} | |
} | |
}, | |
"repetition": { | |
"prototype": "montage/ui/repetition.reel", | |
"properties": { | |
"content": [ | |
"One", | |
"Two", | |
"Three" | |
], | |
"element": {"#": "repetition"} | |
} | |
}, | |
"button": { | |
"prototype": "digit/ui/button.reel", | |
"properties": { | |
"element": {"#": "button"} | |
}, | |
"bindings": { | |
"label": {"<-": "@repetition:iteration.object"} | |
}, | |
"listeners": [ | |
{ | |
"type": "action", | |
"listener": {"@": "owner"} | |
} | |
] | |
} | |
}</script></head> | |
<body> | |
<div data-montage-id="owner"> | |
<ul data-montage-id="repetition"> | |
<button data-montage-id="button"></button> | |
</ul> | |
</div> | |
</body> | |
</html> |
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 Component = require("montage/ui/component").Component; | |
exports.Owner = Component.specialize({ | |
handleAction: { | |
value: function(event) { | |
console.log("action: " + event.target.element.textContent); | |
} | |
} | |
}); |
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
{"version":1} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment