config_view.ts 552 B

1234567891011121314151617181920212223
  1. ///<reference path="../../headers/common.d.ts" />
  2. import angular from 'angular';
  3. /** @ngInject */
  4. function appConfigView(dynamicDirectiveSrv) {
  5. return dynamicDirectiveSrv.create({
  6. scope: {
  7. appModel: "="
  8. },
  9. directive: scope => {
  10. return System.import(scope.appModel.module).then(function(appModule) {
  11. return {
  12. name: 'app-config-' + scope.appModel.appId,
  13. fn: appModule.configView,
  14. };
  15. });
  16. },
  17. });
  18. }
  19. angular.module('grafana.directives').directive('appConfigView', appConfigView);