is sending file, how to show the download window in angular.js [duplicate]

This question already has an answer here:

I have to download a file from the server.

On the server side which is in Node.js, I have this code in my file.js route file:

    .get(function (req, res, next) {'./downloads/help.pdf', 'help.pdf')

And the code in server.js file is:

var file = require('./routes/file');
app.use('/file', file);

I have written a get request on the frontend which is in AngularJS(angular 1) to fetch the file:

$http.get('/file/download').then(function (response) {

     //what to write here to open a download window in browser?


in postman when I am calling ‘/file/download’ its opening a download window. What should I write to achieve the same in my browser window?

Please help

Source: AngularJS