mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
24 lines
578 B
TypeScript
24 lines
578 B
TypeScript
///<reference path="../../headers/common.d.ts" />
|
|
|
|
import angular from 'angular';
|
|
|
|
/** @ngInject */
|
|
function appConfigLoader(dynamicDirectiveSrv) {
|
|
return dynamicDirectiveSrv.create({
|
|
scope: {
|
|
appModel: "="
|
|
},
|
|
directive: scope => {
|
|
return System.import(scope.appModel.module).then(function(appModule) {
|
|
return {
|
|
name: 'appConfigLoader' + scope.appModel.appId,
|
|
fn: scope.appModel.directives.configView,
|
|
};
|
|
});
|
|
},
|
|
});
|
|
}
|
|
|
|
|
|
angular.module('grafana.directives').directive('appConfigLoader', appConfigLoader);
|