I am new to knockoutjs, and can see its benefits/potential. I have what I think is a pretty simple question.
How can I populate my observable array from the server, so to speak. I have got what I want working with 2 hard coded array elements, but am not sure how to tie it to a backend.
Here is a jsfiddle http://jsfiddle.net/P9LLL/
So at least in my head, although I am open to suggestions if I am going about it wrong. How do I replace these lines with something that could be loaded from a db.
new SeatReservation("Bandaid", 10),
new SeatReservation("Bandages", 12)
I have been suggested by a friend to look at the knockout plugin mapping http://knockoutjs.com/documentation/plugins-mapping.html But not sure how to incorporate it into my example.
For what it is worth I am using PHP & MySQL also.
Many thanks for any suggestions.