title: how to bind something to a function in knockout.js
body: <p>I am using knockout.js and upshot.js to get a list of items from API controller on the server. This is basically my view model:</p>
  
  <pre><code>self.templatesDataSource = upshot.dataSources.Templates.refresh();
  self.templates = self.templatesDataSource.getEntities();
  </code></pre>
  
  <p>Binding to properties works just fine:</p>
  
  <pre><code>&lt;div data-bind="foreach: templates"&gt;
      &lt;a href="#" data-bind="text: Title"&gt;&lt;/a&gt;&lt;br /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>But let's say I want the text to not only display the title, but a combination of the title and some other value? Let's say I want <code>Title + ' ' + Id</code>. Based on "example 4" from <a href="http://knockoutjs.com/documentation/options-binding.html" rel="nofollow">here</a>, I'm thinking I should be able to do something like this:</p>
  
  <pre><code>&lt;div data-bind="foreach: templates"&gt;
      &lt;a href="#" data-bind="text: function(item){return item.Title + ' ' + item.Id; }"&gt;&lt;/a&gt;&lt;br /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>However, I see the function text (<code>function(item){...</code>etc) instead of result. I would also need this functionality to construct proper href for the link. How can I accomplish this?</p>