title: Download file from url angular 2
body: <p>i have url : <code>http://localhost:9999/file/bongda.PNG</code></p>
  
  <p>i using nodejs serve for public file :</p>
  
  <pre><code>application.use(express.static(path.join(__dirname, 'uploads')));
  </code></pre>
  
  <p>and </p>
  
  <pre><code>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);
      }
    });
  
  });
  </code></pre>
  
  <p>i want to download file from url </p>
  
  <p>i using <code>&lt;a href="window.location.href='http://localhost:9999/file/bongda.PNG'"&gt;123123&lt;/a&gt;</code>
  or </p>
  
  <pre><code>&lt;a href="http://localhost:9999/file/bongda.PNG"&gt;123123&lt;/a&gt;
  </code></pre>
  
  <p>but it not success .
  please help me ?</p>