mirror of
https://github.com/nasa/openmct.git
synced 2024-12-20 21:53:08 +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:
parent
a2d06583ca
commit
757cb0f015
@ -70,8 +70,10 @@ define(
|
||||
});
|
||||
|
||||
function controller($scope) {
|
||||
// Pass the template URL to ng-include via scope.
|
||||
$scope.inclusion = templateMap[$scope.key];
|
||||
$scope.$watch('key', function (key) {
|
||||
// Pass the template URL to ng-include via scope.
|
||||
$scope.inclusion = templateMap[$scope.key];
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user