Knockout js binding carousel

251 views
Skip to first unread message

Vineet Gupta

unread,
Nov 24, 2020, 10:08:08 AM11/24/20
to KnockoutJS
Did any one let me know how to bind carousel data in ko 

Julio Di Egidio

unread,
Nov 24, 2020, 12:36:00 PM11/24/20
to KnockoutJS
Hi there, here is a starting point:

For simplicity, I am binding image URLs to the text of a span, in reality one would rather bind to the src attribute of an image.

HTH,

Julio

Julio Di Egidio

unread,
Nov 26, 2020, 6:45:44 AM11/26/20
to KnockoutJS
This is a slightly refined version.  There are few mainly cosmetic changes, the only relevant difference is that I am using *an observable instead of a callback* for the scheduler object: as an example of using KO observables beyond the UI, with the benefit of a better design, since now the view constructor can  take  directly a scheduler object as argument, it needn't take a scheduler constructor plus (part of) its arguments.


Julio
Reply all
Reply to author
Forward
0 new messages