Solved

Opening a pdf file in AngularJS

Posted on 2014-10-24
3
1,306 Views
Last Modified: 2014-10-30
I am using Angular and all I want is to open this pdf file in another window. The pdf file is in local directory.

appControllers.controller('reportsController', function AppCtrl($scope, $http, API_URL, $sce, $window) {

 $window.open("file:///C://Development//Report3cqo30eyljm.pdf");
}
0
Comment
Question by:rbhargaw
  • 2
3 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
Comment Utility
that will not work, the browser need to know what it is, so you need a server side code
0
 

Author Comment

by:rbhargaw
Comment Utility
Thanks! So I generated report on Server and accessing them from AngularJS client.

What is the best practice for mobile web app for generating reports? Right now, I am just using desktop to test the report and opening them up in new browser. IS that the right way for mobile web app?
0
 
LVL 82

Expert Comment

by:leakim971
Comment Utility
when you open a pdf in a mobile, the pdf is generaly not opened with your browser
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now