Repeater and parent binding



I have some repeater, that gets data from:

var Observable = require("data/observable").Observable;
exports.loaded = function(args) {
var model = new Observable();
var page = args.object;

model.items = [1,2,3,4];

page.bindingContext = model;
<Repeater items="{{ items }}">
<!-- This works fine -->
<Label text={{items}}></Label>
<!-- now i want to bind value and this is not working -->
<Label text={{data}}></Label>

The Repeater is not seeing this ‘data value’ so my question is how to get this ?
Thanks you.


There is a syntax error in your code: model.set('data','data); has an extra ’

But the problem is data doesn’t correlate to anything in your items array. Try this instead:

model.set("items", [{data:1}, {data:2}, {data:3}]);


Thank you @roblauer, i will check this.