63
rated 0 times
[
68]
[
5]
/ answers: 1 / hits: 48364
/ 11 Years ago, tue, february 26, 2013, 12:00:00
Today is the first day for me in Knockout . Got struck with it . Below is my first sample code using knockout.js and it shows an error .
Cannot read property 'nodeType' of null
Here is my script:`
function ViewModel()
{
var self = this;
self.n1 = ko.observable(10);
self.n2 = ko.observable(10);
self.n3 = ko.observable(10);
}
ko.applyBindings(new ViewModel()); `
Here is my html:
<body>
<p>Number1:<input data-bind=value:n1></input></p>
<p>Number2:<input data-bind=value:n2></input></p>
<p>Number3:<input data-bind=value:n3></input></p>
</body>
I want to know the reason for the above error and how to overcome it...
More From » html