How are you supposed to work with arrays? I am messing with the "elements.html" example provided in the download for the beta and when I try to change the array of fruits to a new array, it doesn't work correctly (places that bind to it show the array as a comma-separated list instead of as distinct values).
In the example, I added this method to the viewModel (bound to a button)...
changeStuff: function(e) {
e.preventDefault();
this.set("fruits", ["Pear", "Peach", "Plumb"]);
}
Also, how would I just change a single value in the list? For example, change "Banana" to "Pineapple"?
In the example, I added this method to the viewModel (bound to a button)...
changeStuff: function(e) {
e.preventDefault();
this.set("fruits", ["Pear", "Peach", "Plumb"]);
}
When I click the button, the "Select" and "Multiple select" lists are updated, but instead of individual lines for each fruit, it shows all the fruits on the same line separated by commas.
Also, how would I just change a single value in the list? For example, change "Banana" to "Pineapple"?