src/components/autocomplete/js/autocompleteController.js
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();
      });
    }
  }
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();
      });
    }
  }
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 ( ) ; } ) ; } }
Removes any events or leftover elements created by this controller
Removes any events or leftover elements created by this controller