Use an anchor tag in url after load with knockout
<p>I am working on a knockout page and I have a list of items. For each item I need them to have an anchor tag to scroll to. The problem I'm having is the anchor tag is being loaded from knockout bindings so, when you click on the url from an external page you would have a problem with it actually scrolling to the item. The page with the hash is a separate page. So in you can't scroll to the hash on page load simply because it doesn't exist until knockout loads the bindings.</p>

<p>For example...</p>

<p>My url = <code>mysite.com/page1#thisItem</code></p>

<p>It should link to page1 with an anchor tag like...</p>

<pre><code>&lt;a name="thisItem"&gt;&lt;/a&gt;
</code></pre>

<p>The problem is that the name gets added after the knockout bindings. I would prefer to do this without javascript checking if it has an id to link to and changing the window.location, however if that's my only choice then I will do it. Does anyone have a more elegant solution to this problem?</p>