src/message/popupComponent.js
function messagePopopComponent(ngeoPopupTemplateUrl) {
  return {
    restrict: 'A',
    templateUrl: ngeoPopupTemplateUrl,
    /**
     * @param {angular.IScope} scope Scope.
     * @param {JQuery} element Element.
     * @param {angular.IAttributes} attrs Attributes.
     */
    link: (scope, element, attrs) => {
      element.addClass('popover');

      /**
       * @param {JQueryEventObject} evt Event.
       */
      scope['close'] = function(evt) {
        if (evt) {
          evt.stopPropagation();
          evt.preventDefault();
        }
        element.addClass('hidden');
      };

      // Watch the open property
      scope.$watch('open', (newVal, oldVal) => {
        element.css('display', newVal ? 'block' : 'none');
      });
    }
  };
}
function messagePopopComponent(ngeoPopupTemplateUrl) {
  return {
    restrict: 'A',
    templateUrl: ngeoPopupTemplateUrl,
    /**
     * @param {angular.IScope} scope Scope.
     * @param {JQuery} element Element.
     * @param {angular.IAttributes} attrs Attributes.
     */
    link: (scope, element, attrs) => {
      element.addClass('popover');

      /**
       * @param {JQueryEventObject} evt Event.
       */
      scope['close'] = function(evt) {
        if (evt) {
          evt.stopPropagation();
          evt.preventDefault();
        }
        element.addClass('hidden');
      };

      // Watch the open property
      scope.$watch('open', (newVal, oldVal) => {
        element.css('display', newVal ? 'block' : 'none');
      });
    }
  };
}
function messagePopopComponent ( ngeoPopupTemplateUrl ) { return { restrict : 'A' , templateUrl : ngeoPopupTemplateUrl , /**
     * @param {angular.IScope} scope Scope.
     * @param {JQuery} element Element.
     * @param {angular.IAttributes} attrs Attributes.
     */ link : ( scope , element , attrs ) => { element . addClass ( 'popover' ) ; /**
       * @param {JQueryEventObject} evt Event.
       */ scope [ 'close' ] = function ( evt ) { if ( evt ) { evt . stopPropagation ( ) ; evt . preventDefault ( ) ; } element . addClass ( 'hidden' ) ; } ; // Watch the open property scope . $watch ( 'open' , ( newVal , oldVal ) => { element . css ( 'display' , newVal ? 'block' : 'none' ) ; } ) ; } } ; }
Provides a directive used to show a popup over the page with
a title and content.


Things to know about this directive:

- This directive is intended to be used along with the popup service.

- By default the directive uses "popup.html" as its templateUrl. This can be
changed by redefining the "ngeoPopupTemplateUrl" value.

- The directive doesn't create any scope but relies on its parent scope.
Properties like 'content', 'title' or 'open' come from the parent scope.

@param {string} ngeoPopupTemplateUrl URL to popup template.
@return {angular.IDirective} Directive Definition Object.
@ngInject
@ngdoc directive
@ngname ngeoPopup
Provides a directive used to show a popup over the page with a title and content .