1
ng-view
に読み込まれたhtmlファイルにdisqusスクリプトを含めましたが、何も表示されません。しかし、私がng-view
からスクリプトを動かすと正常に動作します。 ng-view
の中にdisqusコメントを読み込む方法はありますか?ここでAngularJs:ng-viewでコメントを読み込む
は、htmlファイルです:
<div id="disqus_thread"></div>
<script>
var disqus_config = function() {
this.page.url = 'http://example-com'; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = 'http://example-com'; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = '//example-com.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/? ref_noscript">comments powered by Disqus.</a></noscript>
あなたの助けをありがとうございました。
あなたのコードサンプルとアーキテクチャ – TheBlackBenzKid
はあなたがしようとしたことがあり下さい[角度-ディスカス]を取り付けます(https://github.com/kirstein/angular -disqus /)または同様のngディレクティブ? – Nils
私はそれを試してみましたが、うまくいきません。同じ問題。 –