You need to decide between initializing your vm as an object, or with a constructor function.
This is a combination of both, mostly sintactically invalid I think :):
viewmodel = function()
{
items:ko.observableArray([]);
};
So either do this:
viewmodel = {
items:ko.observableArray([]);
};
Or this:
var VM=function() {
this.items = ko.observableArray([]);
};
var viewModel = new VM();