Reputation: 8882
If I'm outside the context of a knockout object hierarchy (like in a globally referenced common class), is it possible to
Does anyone know of any utils or extensions that do this?
Upvotes: 1
Views: 1345
Reputation: 114792
You will want to look at using ko.dataFor
and/or ko.contextFor
, as described here: http://knockoutjs.com/documentation/unobtrusive-event-handling.html
Given an element, they will tell you the data or context ($data, $root, $parent, $parents) that would be available for binding at that level.
Upvotes: 2