knockout.merge
knockout.merge copied to clipboard
Initialize constructor with data
Hi, maybe i'm missing if there is a way to initialize an observable array with data, at least for performance improvement. Actually, i'm doing that with a patch like this one below
if (knockoutElement.mergeConstructor.length === 1) {
var arrayElement = new knockoutElement.mergeConstructor(element);
knockoutElement.push(arrayElement);
}
But i'm asking if there would be a cleaner method... THX in advance, keep up this great work!