2016-12-05 11 views
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> 

あなたの助けをありがとうございました。

+0

あなたのコードサンプルとアーキテクチャ – TheBlackBenzKid

+0

はあなたがしようとしたことがあり下さい[角度-ディスカス]を取り付けます(https://github.com/kirstein/angular -disqus /)または同様のngディレクティブ? – Nils

+0

私はそれを試してみましたが、うまくいきません。同じ問題。 –

答えて

0

私は最終的に

はありがとう私を保存Disqus Directiveを見つけるすべての

関連する問題