title: _blank got blocked as pop up how can i prevent this?
body: <p>I have created a pdf on the server when i use:</p>
  
  <pre><code>        function GetPdf(document) {
  
  
              //Stores the data and creates the html,pdf file
              $http.post('createpdf/', document).success(function(data){
  
                  console.log(data.filename);
  
                  window.open('download2/'+data.filename+".pdf", "_self");
  
  
              });
  </code></pre>
  
  <p>I get a error message pop up blocked in google chrome.
  When i use the option enable pop ups for this website it all works fine. Is there any way around this ? Because this could be confusing for some users.</p>
  
  <p>But when i use: </p>
  
  <pre><code>window.open('download2/'+data.filename+".pdf", "_self");
  </code></pre>
  
  <p>It opens the page without warnings but then the main application is replaced by the pdf which is not the result i want to have.</p>