I have an Angular controller with two $scope properties:
$scope.details = ortabilityService.detail();
$scope.treeViewOptions = {
dataSource: new kendo.data.HierarchicalDataSource({
data: $scope.details
};
As we can see, tree view options depend on details to be resolved before it uses it as data source. Now, the problem is that it is an Async call and it is always not guarantee that it is resolved before it is used inside treeviewOptions. Because of this it is a very unreliable load and it loads sometimes and does not load some times. How can I make sure that $scope.details has value before it is used inside treeViewOptions?