I have SPA pages that uses durandaljs and knockoutjs. Now I am going to implement a support of disqus plugin for my site.
When I added disqus I have found that the same comments is showing up for different pages with different URL (I used durandal for URL rewriting).
I guess that root of this issue is that my rewrote URL's are distinguished by full hashbang(#!)

The code is following:
var disqus_shortname = 'somename';
var disqus_identifier = context.id;
(function () {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
if (typeof DISQUS != 'undefined') {
DISQUS.reset({
reload: true,
config: function () {
this.page.title = "title" + context.id;
this.page.identifier = context.id;
this.page.url = "http://localhost:23054/#!ideas/details/" + context.id;
debugger;
}
});
}
View:
<div id="disqus_thread"></div>
I hope somebody uses disqus comments with SPA pages and knows how to help me to solve this.