Disqus-here

Angular directive for Disqus

<--- Basic usage Home page --->

Disqus Here - advanced example


in HTML file:

<button ng-click="toggleComments()">Toggle comments</button>
<div ng-show="showComments">
  <disqus-here shortname="{{name}}" url="{{url}}"
               category-id="id" disable-mobile="false"
               title="{{title}}" on-ready="onLoad()"
               display-comments="showComments">
  </disqus-here>
</div>

in angular controller:

$scope.name = 'disqushere';
$scope.url = 'http://lukasz-zak.github.io/disqus-here/';
$scope.title = 'Disqus here advanced example!';
$scope.id = '2014';
$scope.showComments = false;

$scope.toggleComments = function () {
  $scope.showComments = !$scope.showComments;
};

$scope.onLoad = function () {
  alert('Disqus loaded!\n(alert from callback)');
};

Result: