Hi,
I have a simple question on Observable.addAll().
I am trying to add a list to the existing one. When I run the code below, it prints out 1,2,1,2,3,4,5,2,3,4,5 instead of 1,2,1,2,3,4,5.
It seems like there is something wrong with “Each” element since the numbers variable contains the right value.
Code:
<App>
<JavaScript>
var Observable = require('FuseJS/Observable');
var numbers = Observable(1,2);
function increment(){
numbers.addAll([1,2,3,4,5]);
};
module.exports = {
numbers : numbers,
increment : increment
};
</JavaScript>
<DockPanel>
<Button Text="increment" Clicked="{increment}" Dock="Top"/>
<StackPanel>
<Each Items="{numbers}">
<Text Value="{}"/>
</Each>
</StackPanel>
</DockPanel>
</App>