Q:

Download file from url angular 2

i have url : http://localhost:9999/file/bongda.PNG
i using nodejs serve for public file :
application.use(express.static(path.join(__dirname, 'uploads')));

and 
application.get('/file/:name', function (req, res, next) {

  var options = {
    root: __dirname + '/uploads/',
    dotfiles: 'deny',

    headers: {
        'x-timestamp': Date.now(),
        'x-sent': true
    }
  };
    console.log('Express server listening downloads ');
  var fileName = req.params.name;
  res.type('png'); 
  res.sendFile(fileName, options, function (err) {
    if (err) {
      next(err);
    } else {
      console.log('Sent:', fileName);
    }
  });

});

i want to download file from url 
i using <a href="window.location.href='http://localhost:9999/file/bongda.PNG'">123123</a>
or 
<a href="http://localhost:9999/file/bongda.PNG">123123</a>

but it not success .
please help me ?

A:

 <a href="http://localhost:9999/video.mp4" download> Dowload Video </a>

i using html5 href .it's OK 

