公告
财富商城
积分规则
提问
发文
2019-08-10 08:57发布
Explosion°爆炸
I have this fiddle:
http://jsfiddle.net/gY2JV/63/
How come the data is not showing?
There are several things that should be changed:
vm = new DocsVM({ MyDocs: ko.mapping.fromJS(jsonData) });
Why do the mapping here when DocsVM does another mapping?
vm = new DocsVM(jsonData);
Template names need to be in quotation marks:
template: {name: TrTemplate
=>
template: {name: 'TrTemplate'
This is not a valid binding:
<a data-bind="html: 'DisplayName
<a data-bind="text: DisplayName
Another note: Why do you bind the event handler for the button using jQuery? Use knockout for that, for the sake of consistency.
http://jsfiddle.net/gY2JV/64/
最多设置5个标签!
There are several things that should be changed:
Why do the mapping here when DocsVM does another mapping?
Template names need to be in quotation marks:
=>
This is not a valid binding:
=>
Another note: Why do you bind the event handler for the button using jQuery? Use knockout for that, for the sake of consistency.
http://jsfiddle.net/gY2JV/64/