mirror of
https://github.com/nasa/openmct.git
synced 2025-04-07 19:34:25 +00:00
Remove MCT-Template component (#4537)
This commit is contained in:
parent
6bdea20f9a
commit
85fe838c04
@ -121,7 +121,6 @@
|
||||
import Inspector from '../inspector/Inspector.vue';
|
||||
import MctTree from './mct-tree.vue';
|
||||
import ObjectView from '../components/ObjectView.vue';
|
||||
import MctTemplate from '../legacy/mct-template.vue';
|
||||
import CreateButton from './CreateButton.vue';
|
||||
import multipane from './multipane.vue';
|
||||
import pane from './pane.vue';
|
||||
@ -136,7 +135,6 @@ export default {
|
||||
Inspector,
|
||||
MctTree,
|
||||
ObjectView,
|
||||
'mct-template': MctTemplate,
|
||||
CreateButton,
|
||||
multipane,
|
||||
pane,
|
||||
|
@ -1,39 +0,0 @@
|
||||
<template>
|
||||
<div></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
inject: ['openmct'],
|
||||
props: {
|
||||
templateKey: {
|
||||
type: String,
|
||||
default: undefined
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
let openmct = this.openmct;
|
||||
let $injector = openmct.$injector;
|
||||
let angular = openmct.$angular;
|
||||
|
||||
let templateLinker = $injector.get('templateLinker');
|
||||
|
||||
let templateMap = {};
|
||||
$injector.get('templates[]').forEach((t) => {
|
||||
templateMap[t.key] = templateMap[t.key] || t;
|
||||
});
|
||||
|
||||
let $rootScope = $injector.get('$rootScope');
|
||||
this.$scope = $rootScope.$new();
|
||||
|
||||
templateLinker.link(
|
||||
this.$scope,
|
||||
angular.element(this.$el),
|
||||
templateMap[this.templateKey]
|
||||
);
|
||||
},
|
||||
destroyed() {
|
||||
this.$scope.$destroy();
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
x
Reference in New Issue
Block a user