title: how to specify mvc3 action links with knockout templates
body: <p>I have a knockout template (using koExternaltemplateEngine_all.js) in which I want an edit link that will direct to a controller/action. I quite like what knockout provides for me in terms of MVVM, but uncertain if I'm trying to mix apples and oranges by specifying an action link in a knockout view. I'd like to knock what is the best way to accomplish this?</p>
  
  <p>Thanks in advance!</p>
  
  <pre><code>&lt;p&gt;
    &lt;b&gt;&lt;span data-bind='text: Title'&gt;&lt;/span&gt;&lt;/b&gt;
    &lt;span data-bind='text: ArticleDate'&gt;&lt;/span&gt;
  &lt;/p&gt;
  &lt;span data-bind='text: BodyText'&gt;&lt;/span&gt;
  </code></pre>
  
  <p>Something like</p>
  
  <pre><code>&lt;a data-bind="attr: { 'href': '@Url.Action("Details" .. ?
  </code></pre>
  
  <p>The Model</p>
  
  <pre><code>    public class SecureModel
      {
         public SecureModel()
         {
  
         }
  
         private List&lt;Article&gt; _articles;
  
         public List&lt;Article&gt; Announcements
         {
            get
            {
                return _articles;
            }
            set
            {
                _articles = value;
            }
         }
      }
  </code></pre>
  
  <p>View </p>
  
  <pre><code>    @model UI.Models.SecureModel
      @{
        ViewBag.Title = "Announcements";
      }
      var viewModel = {
  
      isEditable: ko.observable(false),
      articles: ko.mapping.fromJS([]),
      loadInitialData: function () {
          ko.mapping.fromJS(serverData, dataMappingOptions, viewModel.articles);
      },
      loadUpdatedData: function () {
          ko.mapping.fromJS(serverData, dataMappingOptions, viewModel.articles);
      }
  };
  </code></pre>