Issue loading knockout components view model using requireJS

后端 未结 1 1354
既然无缘
既然无缘 2020-12-18 08:26

I am working with the new components functionality of knockout 3.2 and trying to load the components using requireJS. However, I am having a weird issue. Basically, when I h

相关标签:
1条回答
  • 2020-12-18 08:39

    [copied from comment as a answer to avoid confusion]

    Is your ko.components.register line wrapped inside a requirejs module?

    I suspect you load javascript file knockout.js before require.js file, and then you access global ko variable to do ko.components.register which is a different ko object from the one loaded by require.js.

    0 讨论(0)
提交回复
热议问题