Iftekharul Islam | 8b4828a | 2017-04-19 14:37:55 -0500 | [diff] [blame] | 1 | window.angular && (function (angular) { |
| 2 | 'use strict'; |
| 3 | |
| 4 | angular |
| 5 | .module('app.common.directives') |
| 6 | .directive('logEvent', ['APIUtils', function (APIUtils) { |
| 7 | return { |
| 8 | 'restrict': 'E', |
| 9 | 'templateUrl': 'common/directives/log-event.html', |
| 10 | 'scope': { |
| 11 | 'event': '=', |
| 12 | 'tmz': '=' |
| 13 | }, |
| 14 | 'controller': ['$rootScope', '$scope','dataService', '$location', '$timeout', function($rootScope, $scope, dataService, $location, $timeout){ |
| 15 | $scope.dataService = dataService; |
| 16 | $scope.copySuccess = function (event) { |
| 17 | event.copied = true; |
| 18 | $timeout(function(){ |
| 19 | event.copied = false; |
| 20 | }, 5000); |
| 21 | }; |
| 22 | $scope.copyFailed = function (err) { |
| 23 | console.error('Error!', err); |
| 24 | }; |
| 25 | }] |
| 26 | }; |
| 27 | }]); |
| 28 | })(window.angular); |