I have a list of files stored in $scope.data
that I retrieved from the searchFactory. Now, my goal is to display these files in the browser window. How can I accomplish this task?
ctrl.js
$scope.displayFiles = function (){
$window.open($scope.data = angular.copy(searchFactory.getDitLogs()));
console.log("Function executed successfully:", $scope.data);
};
main.html
<button
type="button"
class="btn btn-info btn-lg"
ng-click="displayFiles()"
style="margin-left: 10px">
<span class="glyphicon glyphicon-folder-close"></span>
</button>