Angular 2应用程序中的Disqus:显示相同的讨论. [英] Disqus in Angular 2 application: Showing same discussion.

查看:85
本文介绍了Angular 2应用程序中的Disqus:显示相同的讨论.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有Angular 2应用,我在其中使用 ng2-awesome-disqus 组件.

I have Angular 2 app in there I use ng2-awesome-disqus component.

在页面上我有几个项目,并且每个项目都有一个讨论组件:

<disqus [shortname]="shortname" [identifier]="identifier"></disqus>

    每个项目的
  • 简称是相同的

    标识符对于每个项目都是唯一的

    identifier is unique for each item

    我希望每个项目都经过独特的讨论,但都一样.

    I would expect unique discussion for each item, but there are all the same.

    推荐答案

    默认情况下,disqus每页只允许一个小部件.我认为(实际上,我敢肯定),您的模块只能处理一个disqus小部件.看看服务代码.

    By default, disqus only allows a single widget per page. I think (actually, I'm sure), your module can only deal with one disqus widget. Take a look at the code of the service.

    您必须自己创建一个项目并管理多个窗口小部件,或者创建自己的组件(如果可能).

    You have to fork this project and manage multiple widget by yourself or create your own component that will do that if possible.

    此问题可能会有所帮助.

    这篇关于Angular 2应用程序中的Disqus:显示相同的讨论.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆