Created
September 12, 2014 20:26
-
-
Save webOS101/61994e43b3556b2d0dae to your computer and use it in GitHub Desktop.
Repeater Sample
This file contains 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
enyo.ready(function() { | |
enyo.kind({ | |
name: 'RepeaterSample', | |
kind: 'Scroller', | |
components: [{ | |
kind: 'Repeater', | |
count: 100, | |
components: [{ name: 'text' }], | |
onSetupItem: 'setupItem', | |
ontap: 'tapped' | |
}], | |
setupItem: function(sender, event) { | |
var item = event.item; | |
item.set('$.text.content', 'This is row ' + event.index); | |
return(true); | |
}, | |
tapped: function(sender, event) { | |
enyo.log(event.index); | |
} | |
}); | |
new enyo.Application({name: 'app', view: 'RepeaterSample'}); | |
}); |
This file contains 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
name: Repeater Sample | |
description: Using a repeater | |
authors: | |
- Roy Sutton | |
normalize_css: no |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment