问题
I want to try the simpleGrid in a HotTowel project. When it came to:
this.gridViewModel = new ko.simpleGrid.viewModel({
data: this.items, ....
it threw an exception:
Unable to get property 'viewModel' of undefined or null reference`
I stepped through and found that ko.simpleGrid is undefined.
Must any other files be added or is simpleGrid available from the standard Knockout.js library?
回答1:
Check the fiddle (http://jsfiddle.net/rniemeyer/QSRBR/) provides in the Simple Grid sample. It need the KO library + knockout.simpleGrid.1.3.js
And you need to define the PageGridModel
ko.applyBindings(new PagedGridModel(initialData));
来源:https://stackoverflow.com/questions/18507885/does-the-simplegrid-require-additional-downloads