3.0.1 • Published 10 months ago

ngx-disqus v3.0.1

Weekly downloads
876
License
MIT
Repository
github
Last release
10 months ago

Add Disqus to your app instantly!

npm Stackblitz npm npm bundle size (minified + gzip) npm

Installation

npm i ngx-disqus

Usage

Set the Disqus shortname which is the unique identifier for your website as registered on Disqus

import { DISQUS_SHORTNAME } from 'ngx-disqus';

export const appConfig: ApplicationConfig = {
  providers: [
    {
      provide: DISQUS_SHORTNAME,
      useValue: 'disqus_shortname'
    },
  ]
}

Now you can use the Disqus component

import { DisqusModule } from 'ngx-disqus';

@Component({
  standalone: true,
  imports: [DisqusModule],
  selector: 'single-post',
  template: `<disqus [identifier]="pageId"></disqus>`
})
export class SinglePostComponent {
  pageId: string = '/post/123';
}
  • Disqus component requires the identifier input to work properly on your app
  • For example if the page URL is localhost:4200/about then the identifier should be /about.

Here is a stackblitz

More Options

See Disqus official documentation (JavaScript configuration variables) before using these inputs.

<disqus [identifier]="pageId" [url]="url" [category]="catId" [language]="'en'"
        (newComment)="onComment($event)" (ready)="onReady($event)" (paginate)="onPaginate($event)"></disqus>

NOTE

The HashLocationStrategy is not compatible with Disqus

For more info check DISQUS on ajax sites


Issues

If you identify any errors in this component, or have an idea for an improvement, please open an issue!

Author

Murhaf Sousli

More plugins

3.0.1

10 months ago

3.0.0

10 months ago

2.4.3

5 years ago

2.4.2

6 years ago

2.4.1

6 years ago

2.4.0

6 years ago

2.4.0-beta.0

6 years ago

2.3.7

6 years ago

2.3.6

6 years ago

2.3.5

6 years ago

2.3.4

6 years ago

2.3.3

6 years ago

2.3.2

6 years ago

2.3.1

6 years ago

2.3.0

6 years ago

2.2.1

7 years ago

2.2.0

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.2.0

7 years ago