0👍
✅
wrap drilldown with $timeout
to trigger digest cycle:
function changeToDrilldown(setIndex){
if ($scope.charts.temp===null){
$timeout(function () {
$scope.charts.temp = $scope.charts.primary;
$scope.charts.primary = $scope.charts.drilldown[setIndex];
}, 0);
}
}
Source:stackexchange.com