ko.mapping is undefined
Asked Answered
B

1

17

im following this example http://jsfiddle.net/rniemeyer/badZb/ . I just copy and paste the exact code into a sample application and it gave me this error : "ko.mapping is undefined" . Anyone know whats happening? My ko.observable and dependentObservable are working great, is just that ko.mapping is not working.

FYI : The knockout.js version is 2.0 and Jquery 1.7.1

Byyourleave answered 7/2, 2012 at 15:3 Comment(0)
C
29

As the mapping plugin is exactly that, a plugin, it is not included in the core library.

You need to include the mapping plugin separately. You can find it on GitHub. Just make sure you include it after including the core Knockout library.

Colchicine answered 7/2, 2012 at 15:5 Comment(3)
OMG. Just kill me. Thanks alotByyourleave
No problem :) Easy to overlook the obvious sometimes!Colchicine
the problem i think is that there is a mapping walkthrough on knockout's primary site leading you to believe that it's baked in.Material

© 2022 - 2024 — McMap. All rights reserved.