code: function ToggleComponentController($scope, $element, $attrs, $q, $mdComponentRegistry) {
      var self = this;
  
      // Use Default internal method until overridden by directive postLink
  
      self.toggleOpen = function () {
        return $q.when($scope.isOpen);
      };
  
      self.isOpen = function () {
        return !!$scope.isOpen;
      };
  
      self.open = function () {
        return self.$toggleOpen(true);
      };
  
      self.close = function () {
        return self.$toggleOpen(false);
      };
  
      self.toggle = function () {
        return self.$toggleOpen(!$scope.isOpen);
      };
  
      self.destroy = $mdComponentRegistry.register(self, $attrs.mdComponentId);
    }
docs: @private
  @ngdoc controller
  @name ToggleComponentController
  @module <%= scriptAppName %>.toggleComponent