code: function updateIsOpen(isOpen) {
          var parent = element.parent();
  
          if (scope.keyDown) {
            parent[isOpen ? 'on' : 'off']('keydown', onKeyDown);
          }
  
          if (isOpen) {
            triggeringElement = $document[0].activeElement;
          }
  
          return promise = $q.all([
            $animate[isOpen ? 'removeClass' : 'addClass'](element, 'toggle-component-closed')
              .then(function setElementFocus() {
                if (scope.isOpen) {
                  element.focus();
                }
              })
          ]);
        }
docs: Toggle the toggleComponent view and attach/detach listeners
  @param isOpen