I'm using knockout with a foreach loop, and my specific element i want to bind the text element of a span to an anonymous function, however there is just a string version of the function returned
<span data-bind="text: function(ri) { ri.itemNameAndRateplan() + ' ' + ri.Adults(); }"></span>
when run returns function (ri){ ri.itemNameAndRateplan() +' '+ ri.Adults();}
as the html for the element.
I would expect it to be something like ratePlanNameValue 4
How do i fix this?