code: function cleanup () {
      if (!ctrl.hidden) {
        $mdUtil.enableScrolling();
      }
  
      angular.element($window).off('resize', debouncedOnResize);
  
      if (elements){
        var items = ['ul', 'scroller', 'scrollContainer', 'input'];
        angular.forEach(items, function(key){
          elements.$[key].remove();
        });
      }
    }
docs: Removes any events or leftover elements created by this controller