This is a short follow-up post based on Reusable Bootstrap Modal Forms in which I described how an AngularJS Directive can be used to encapsulate a number of templates and configurations to present a re-usable Bootstrap Modal form.
A Polymorphic Commentable Widget?
To be specific, it is:
- the commenting functionality is not tied to any specific object. In other words, the same code can be used to comment against an Article, a Cat Photo or any business object without any modification
- the same code should display previous comments in a nested fashion
- provide a facility to reply to a comment
- provide a facility to edit or delete any of your own comments