Sha256: 222f0d89f29b951a16d8b2e6d07ee2b1bd1e879e9fa3ce1ee4f3f70b0026d6b5
Contents?: true
Size: 1012 Bytes
Versions: 6
Compression:
Stored size: 1012 Bytes
Contents
define([ 'angular', 'app', 'lodash' ], function (angular, app, _) { 'use strict'; angular .module('kibana.directives') .directive('addPanel', function($compile) { return { restrict: 'A', link: function($scope, elem) { $scope.$on("$destroy",function() { elem.remove(); }); $scope.$watch('panel.type', function() { var _type = $scope.panel.type; $scope.reset_panel(_type); if(!_.isUndefined($scope.panel.type)) { $scope.panel.loadingEditor = true; $scope.require(['panels/'+$scope.panel.type.replace(".","/") +'/module'], function () { var template = '<div ng-controller="'+$scope.panel.type+'" ng-include="\'app/partials/paneladd.html\'"></div>'; elem.html($compile(angular.element(template))($scope)); $scope.panel.loadingEditor = false; }); } }); } }; }); });
Version data entries
6 entries across 6 versions & 1 rubygems