var app = angular.module('redbillApp', []); app.controller('PCController', function($scope) { $scope.init = function() { // Initialization logic }; $scope.downloadEXE = function() { const link = document.createElement('a'); link.href = 'RedBill_Desktop_App_Setup_1_0_0.exe'; // Same directory as pc.html link.download = 'RedBill Desktop App Setup 1.0.0.exe'; document.body.appendChild(link); link.click(); document.body.removeChild(link); }; });