social:comment-list

Description

The comment list directive to render a list of comments

Usage

as element:
<social:comment-list
       target="{string}"
       platform="{object}"
       [format="{string}"]
       [delete-label="{string}"]
       [show="{number}"]
       [show-more="{number}"]
       [show-more-label="{string}"]
       [show-less-label="{string}"]
       [empty-text="{string}"]
       [default-delete-message="{string}"]
       [avatars="{string}"]>
</social:comment-list>

Directive info

  • This directive creates new scope.

Parameters

Param Type Details
target string

The ID of the document that should be commented on.

platform object

The platform Object

format
(optional)
string

How to format the date (formats supported: https://docs.angularjs.org/api/ng/filter/date and 'relative'which outputs the relative date (e.g. 2 hours ago)). Default: relative

delete-label
(optional)
string

Label to display for the delete action (default: "x").

show
(optional)
number

How many comments should be displayed initially (default:2).

show-more
(optional)
number

How many more comments should be added to the list each time the user clicks 'Show more' (default: 4).

show-more-label
(optional)
string

Label to display for 'show more' action (default: "Show more comments").

show-less-label
(optional)
string

Label to display for 'show fewer' action (default: "Show fewer").

empty-text
(optional)
string

Message to display when there are no comments to show (default: "").

default-delete-message
(optional)
string

Label to display when the delete action clicked (default: "Are you sure you want to remove this comment?").

avatars
(optional)
string

Whether to display avatars next to each comment (default: "true").