mirror of
https://github.com/nasa/openmct.git
synced 2025-06-16 14:18:16 +00:00
[Representation] Watch for key changes
...from mct-include. Improves behavior of that directive and supports testing of changes to remove whole elements when inapplicable, nasa/openmctweb#195.
This commit is contained in:
@ -70,8 +70,10 @@ define(
|
|||||||
});
|
});
|
||||||
|
|
||||||
function controller($scope) {
|
function controller($scope) {
|
||||||
|
$scope.$watch('key', function (key) {
|
||||||
// Pass the template URL to ng-include via scope.
|
// Pass the template URL to ng-include via scope.
|
||||||
$scope.inclusion = templateMap[$scope.key];
|
$scope.inclusion = templateMap[$scope.key];
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Reference in New Issue
Block a user