Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 638 Bytes

README.md

File metadata and controls

38 lines (28 loc) · 638 Bytes

Angular Disqus

Installation

Install it with npm

$ npm install --save ng-disqus

Usage

Import DisqusModule in the root module

import { NgDisqusModule } from 'ng-disqus';
@NgModule({
  imports: [
    // ...
    NgDisqusModule.forRoot('disqus_shortname')
  ]
})

The paramter shortname is the unique identifier for your website as registered on Disqus, make sure it is defined in your module.

Now you can add Disqus component

@Component({
  selector: 'any-component',
  template: `<ng-disqus [identifier]="pageId"></ng-disqus>`
})
export class AnyComponent {

  pageId = '/about';
}