I am working on a SPA project where images are being hosted at cloudinary and corresponding url's are stored on my database. I am using knockout to fetch details. Looks like the carousel function is loading well before .getJSON hence the issue below.
I am working on a SPA project where images are being hosted at cloudinary and corresponding url's are stored on my database. I am using knockout to fetch details. Looks like the carousel function is loading well before .getJSON hence the issue below.
Uncaught TypeError: Unable to process binding "owlCarousel: function (){return { data:images,owlOptions:{ singleItem:true,afterMove:onCarouselMoved}} }" Message: Cannot read property '0' of undefined knockout-owlCarousel.js:120ko.bindingHandlers.owlCarousel.init knockout-owlCarousel.js:120(anonymous function) knockout.js:63a.Y.a.k.B knockout.js:34(anonymous function) knockout.js:63a.a.u knockout.js:10f knockout.js:62h knockout.js:60g knockout.js:60h knockout.js:60g knockout.js:60a.Ca knockout.js:66(anonymous function) knockout.js:76A.notifySubscribers knockout.js:32(anonymous function) knockout.js:68setTimeout (async)(anonymous function) knockout.js:68(anonymous function) knockout.js:68(anonymous function) knockout.js:68k knockout.js:69(anonymous function) knockout.js:70(anonymous function) knockout.js:68d knockout.js:70a.g.ub.loadViewModel knockout.js:73e knockout.js:68(anonymous function) knockout.js:69g knockout.js:71b knockout.js:69(anonymous function) knockout.js:72g knockout.js:71a.g.ub.loadComponent knockout.js:72e knockout.js:68(anonymous function) knockout.js:68(anonymous function) knockout.js:68a.g.ub.getConfig knockout.js:72e knockout.js:68c knockout.js:68d knockout.js:67a.g.get knockout.js:69a.s.o knockout.js:76k knockout.js:42a.s.a.j knockout.js:45a.d.component.init knockout.js:75(anonymous function) knockout.js:63a.Y.a.k.B knockout.js:34(anonymous function) knockout.js:63a.a.u knockout.js:10f knockout.js:62h knockout.js:60a.pb knockout.js:66addNewTab tabs.js:36onclick
Here is my source code: function insert(str, index, value) { return str.substr(0, index) + value + str.substr(index); }
function TabDetailsViewModel(params) { var self = this; self.title = ko.observable("");
self.brief = ko.observable(""); self.extended = ko.observable(""); self.heroImage = ko.observable(""); self.address = ko.observable(""); self.images = ko.observableArray();
}
ko.components.register('tab-details', { template: '