{"id":13481807,"url":"https://github.com/JayChase/angular2-disqus","last_synced_at":"2025-03-27T12:31:34.269Z","repository":{"id":57179583,"uuid":"62270383","full_name":"JayChase/angular2-disqus","owner":"JayChase","description":"A DISQUS integration for Angular2","archived":false,"fork":false,"pushed_at":"2017-08-07T11:02:45.000Z","size":97,"stargazers_count":12,"open_issues_count":3,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-22T17:11:32.837Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JayChase.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-30T01:46:54.000Z","updated_at":"2024-08-22T17:11:32.838Z","dependencies_parsed_at":"2022-09-14T03:30:36.673Z","dependency_job_id":null,"html_url":"https://github.com/JayChase/angular2-disqus","commit_stats":null,"previous_names":["useful-software-solutions-ltd/angular2-disqus"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayChase%2Fangular2-disqus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayChase%2Fangular2-disqus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayChase%2Fangular2-disqus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayChase%2Fangular2-disqus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JayChase","download_url":"https://codeload.github.com/JayChase/angular2-disqus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245845003,"owners_count":20681814,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T17:00:56.004Z","updated_at":"2025-03-27T12:31:33.934Z","avatar_url":"https://github.com/JayChase.png","language":"JavaScript","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"## angular2-disqus\n\n[DISQUS](https://disqus.com/) integration with Angular.\n\n#### Quick links\n[Plunker template](http://embed.plnkr.co/mIv6Fy/), \n[Disqus developer help](https://disqus.com/api/docs/)\n\n### Install\n\n```bash\nnpm install --save angular2-disqus\n```\n\n### Setup\n\n#### Add the DISQUS script\n\nAdd the DISQUS embed in the body of your main page (index.html) making sure to change the url to your disqus site url.\n\n**Breaking change as of v3 the embed script must now be in the body of the page not the head**\n\n ```html\n\u003chtml\u003e\n\n\u003chead\u003e\n  \u003ctitle\u003edemo app\u003c/title\u003e\n  \u003cmeta charset=\"UTF-8\"\u003e\n  \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\"\u003e\n\n  \u003cbase href=\"/\"\u003e\n\n  \u003clink href=\"../node_modules/@angular2-material/core/style/core.css\" rel=\"stylesheet\"\u003e\n\n  \u003c!-- Polyfill(s) for older browsers --\u003e\n  \u003cscript src=\"../node_modules/core-js/client/shim.min.js\"\u003e\u003c/script\u003e\n\n  \u003cscript src=\"../node_modules/zone.js/dist/zone.js\"\u003e\u003c/script\u003e\n  \u003cscript src=\"../node_modules/reflect-metadata/Reflect.js\"\u003e\u003c/script\u003e\n  \u003cscript src=\"../node_modules/systemjs/dist/system.src.js\"\u003e\u003c/script\u003e\n\n  \u003cscript src=\"../public/js/systemjs.config.js\"\u003e\u003c/script\u003e\n\n  \u003cscript\u003e\n      System.import('demo').catch(function(err){ console.error(err); });\n    \u003c/script\u003e\n\u003c/head\u003e\n\n\u003cbody\u003e\n  \u003cdemo-app\u003eLoading...\u003c/demo-app\u003e\n  \u003cscript src=\"//angular2disqustest.disqus.com/embed.js\"\u003e\u003c/script\u003e\n\u003c/body\u003e\n\n\u003c/html\u003e\n```\n\n#### SystemJS\n\nIn the SystemJs config file (systemjs.config.js) add a mapping for the package\n\n```javascript\nvar map = {\n    ...\n    'angular2-disqus': 'node_modules/angular2-disqus/lib'\n};\n```\n\nand add the package to the list of packages\n\n ```javascript\nvar packages = {\n    ...\n    'angular2-disqus': { main: 'disqus.module.js', defaultExtension: 'js' }\n};\n```\n### or for angular-cli\n\nJust install the package and then import the module as below.\n\n### Usage\n\nAt the relevant level for your app add import the **DisqusModule**.\n\nFor example in **app.module.ts**\n\n```javascript\nimport { NgModule }       from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\n\nimport { FormsModule } from '@angular/forms';\n\nimport { AppComponent }   from './app.component';\nimport { DemoComponent } from './demo.component';\n\nimport { DisqusModule } from 'angular2-disqus';\n\nimport { MdCardModule } from '@angular2-material/card';\nimport { MdToolbarModule } from '@angular2-material/toolbar';\nimport { MdButtonModule } from '@angular2-material/button';\nimport { MdInputModule } from '@angular2-material/input';\n\n@NgModule({\n    imports: [\n        //A2 stuff\n        BrowserModule,\n        FormsModule,\n        //src module\n        DisqusModule,\n        //material modules\n        MdCardModule,\n        MdToolbarModule,\n        MdButtonModule,\n        MdInputModule\n    ],\n    declarations: [\n        AppComponent\n    ],\n    bootstrap: [\n        AppComponent\n    ]\n\n})\nexport class AppModule { }\n```\n\nTo add a comments section add it as a nested component on your component and set the pageIdentifier and the pageUrl.\n\n```html\n\u003cdisqus-thread [page-identifier]=\"pageIdentifier\" [page-url]=\"pageUrl\"\u003e\u003c/disqus-thread\u003e\n```\n\nThe comments section will be reset everytime either **page-identifier** or **page-url** are updated and both have a value. Note to avoid [issues](https://help.disqus.com/customer/en/portal/articles/662547-why-are-the-same-comments-showing-up-on-multiple-pages-) with comments showing up on the wrong page always set both. \n\n### Future\nAdd support for comment counts??\nhttps://help.disqus.com/customer/portal/articles/565624-tightening-your-disqus-integration\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJayChase%2Fangular2-disqus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJayChase%2Fangular2-disqus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJayChase%2Fangular2-disqus/lists"}