[Addressability] Obey view query string param

Obey the query string parameter for a view, if present.
WTD-1149.
This commit is contained in:
Victor Woeltjen
2015-06-16 14:58:03 -07:00
parent 26fd56a003
commit fec6f06849
4 changed files with 71 additions and 9 deletions

View File

@ -53,12 +53,14 @@ define(
// Get list of views, read from capability
function updateOptions(views) {
$timeout(function () {
$scope.ngModel.selected = findMatchingOption(
views || [],
($scope.ngModel || {}).selected
);
}, 0);
if (Array.isArray(views)) {
$timeout(function () {
$scope.ngModel.selected = findMatchingOption(
views,
($scope.ngModel || {}).selected
);
}, 0);
}
}
// Update view options when the in-scope results of using the
@ -68,4 +70,4 @@ define(
return ViewSwitcherController;
}
);
);