diff options
Diffstat (limited to 'node_modules/ng-dialog/example/inside-directive/inside-directive-plain.js')
-rw-r--r-- | node_modules/ng-dialog/example/inside-directive/inside-directive-plain.js | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/node_modules/ng-dialog/example/inside-directive/inside-directive-plain.js b/node_modules/ng-dialog/example/inside-directive/inside-directive-plain.js new file mode 100644 index 0000000000..9de0473993 --- /dev/null +++ b/node_modules/ng-dialog/example/inside-directive/inside-directive-plain.js @@ -0,0 +1,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 + }); + }); + + } + }; + }; + +})(); |