knockout $data binding to an HTML element
问题 So, suppose I have this viewmodel named people which consists of an array of person object literals , like [{ name = John, age = 30, sex = male }, { name = Mike, age = 29, sex = male }, { name = Anna, age = 28, sex = female }] And suppose I wanted to data-bind each person to an <li> , like <ul data-bind="foreach: people"> <li data-bind="text: name"></li> </ul> But , is it possible, maybe through data-bind="with: $data" , to bind the whole person object to the <li> so, for example, when I