I have the following code:
<div data-bind="foreach: roomba">
<h3 data-bind="text: name"></h3>
<a href="/arena/bots/status?id=1234">View Status</a>
</div>
My dilemma is that I’d like the id parameter in the anchor tag to be bound to the id of the roomba currently being iterated over. How do I do this?
Try Defining the URL in the view binding. Then bind to that url in data-bind=”attr”
Take a look at this example:
Then in your model