code: function change(open) {
  
                      var anchor = getAnchor(attrs['for']);
  
                      if (angular.isUndefined(open)) {
                          return;
                      }
  
                      if (angular.isObject(open)) {
                          // HTMLElement, Event
                          anchor = open;
                      }
  
                      if (open) {
                          // 使用 setTimeout 等待 ng-show 在 UI 上生效
                          elem.css('visibility', 'hidden');
                          setTimeout(function() {
                              elem.css('visibility', 'visible');
                              popup[attrToBoolean(attrs.modal) ? 'showModal' : 'show'](anchor);
                              setEvent(open);
                          }, 0);
                      } else {
                          popup.close();
                          setEvent(open);
                      }
  
                  }
docs: UI 的显示与隐藏、删除事件