1

I have this fiddle:

http://jsfiddle.net/gY2JV/63/

How come the data is not showing?

1 Answer 1

3

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/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.