Welcome to mirror list, hosted at ThFree Co, Russian Federation.

inside-directive-plain.js « inside-directive « example « ng-dialog « node_modules - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9de0473993fd5806d4619d7e24fa30f76ca1a3f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
(function() {
  angular.module('inside-directive', [])
    .controller('InsideDirective', InsideDirective)

    InsideDirective.$inject = ['$scope'];

  function InsideDirective($scope) {
    this.$scope = $scope;
  }

  angular.module('inside-directive').directive('inside-directive-plain', exampleDirective);

  exampleDirective.$inject = ['$rootScope', 'ngDialog'];

  function exampleDirective($rootScope, ngDialog) {
    return {
      restrict: 'A',
      link: function(scope, element, attrs) {
        element.on('click', function() {
          scope.$dialog = ngDialog.open({
            template: '<button class="icon icon--close" data-ng-click="closeThisDialog()">close dialog</button> test',
            plain: true,
            controller: 'InsideDirective',
            className: 'inside-directive-plain',
            name: 'inside-directive-plain',
            showclose: false
          });
        });

      }
    };
  };

})();