Render main and inspector using angular

This commit is contained in:
Pete Richards
2018-08-16 12:43:10 -07:00
parent 233c17e75b
commit 17cf0cf1e6
22 changed files with 459 additions and 324 deletions

View File

@ -45,15 +45,27 @@ define(
// Link; install event handlers.
function link(scope, element, attrs) {
var removeSelectable = openmct.selection.selectable(
element[0],
scope.$eval(attrs.mctSelectable),
attrs.hasOwnProperty('mctInitSelect') && scope.$eval(attrs.mctInitSelect) !== false
);
var isDestroyed = false;
scope.$on("$destroy", function () {
removeSelectable();
isDestroyed = true;
});
openmct.$injector.get('$timeout')(function () {
if (isDestroyed) {
return;
}
var removeSelectable = openmct.selection.selectable(
element[0],
scope.$eval(attrs.mctSelectable),
attrs.hasOwnProperty('mctInitSelect') && scope.$eval(attrs.mctInitSelect) !== false
);
scope.$on("$destroy", function () {
removeSelectable();
});
});
}
return {