Javascript KoGrid不在Durandal JS框架中工作
如何在durandal JS视图页面中绑定koGrid。下面给出的代码不起作用 视图(html)Javascript KoGrid不在Durandal JS框架中工作,javascript,jquery,asp.net-mvc,knockout.js,durandal,Javascript,Jquery,Asp.net Mvc,Knockout.js,Durandal,如何在durandal JS视图页面中绑定koGrid。下面给出的代码不起作用 视图(html) 如果我从浏览器中检查元素,网格将加载其值。我不知道如何清除该问题。有人能帮我吗?项目需要实际返回才能供视图使用,因此: items: ko.observableArray([ { id: 1, name: "abc", price: "asds" }, {id:1,name:"abc",price:"asds"} ]), activate: function () {
如果我从浏览器中检查元素,网格将加载其值。我不知道如何清除该问题。有人能帮我吗?项目需要实际返回才能供视图使用,因此:
items: ko.observableArray([
{ id: 1, name: "abc", price: "asds" },
{id:1,name:"abc",price:"asds"}
]),
activate: function () {
}
提示
在执行此操作时,请使用客户端调试器,例如ChromeWeb工具(Chrome中的F12)-这将突出显示“项”无法找到
define([ 'repositories/customerRepository', 'plugins/router', 'plugins/http', 'durandal/app', 'knockout'], function (customerRepository, router, http, app, ko) {
var items = ko.observableArray([
{ id: 1, name: "abc", price: "asds" },
{id:1,name:"abc",price:"asds"},
]);
return {
router: router,
items:items,
activate: function () {
},
attached: function (view) {
},
};});
items: ko.observableArray([
{ id: 1, name: "abc", price: "asds" },
{id:1,name:"abc",price:"asds"}
]),
activate: function () {
}