jeff-collins/ment.io — pull request #54 by egoodberry (2014-12-17 20:51:29+00:00)
Title: Clean up generated menus on scope destroy

Currently, any ment.io-generated menu will get appended to the body and then abandoned, even if the scope of its parent element is destroyed. This causes serious problems if this directive gets initialized in several places and different times, as the list of abandoned menus grows and grows. The proposed change listens for the directive's `$destroy` event and removed the element from the DOM at that point.