caitp/ui-comments — pull request #8 by caitp (2013-10-23 09:55:51+00:00)
Title: fix(events): now emiting $scope events rather than DOM events

Due to some issues, I've decided to emit angular $scope events rather than
using $.triggerHandler. The reason for this is primarily to fit in more
closely with Angular, and to avoid some of the undocumented weirdness which
jQuery performs. (jQuery undecorates jq elements, though jqlite does not).

BREAKING CHANGE:

Rather than binding `$element.bind('filled.comments', fn)`, one must instead
`$scope.$on('$filledNestedComments', fn)` and expect a jQuery/jqLite element,
which is either the comment element itself (if there is no commentsTransclude
in use), or the commentsTransclude element (or the comments collection which
replaces it) if it is present.

Similarly, `$element.bind('emptied.comments', fn)` must instead be written as
`$scope.$on('$emptiedNestedComments', fn)`. The same parameter rules as above
apply.

The event names are not yet final, and will likely be broken again in the
near future.