Solved

Opening a pdf file in AngularJS

Posted on 2014-10-24
3
1,869 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
ID: 40403325
that will not work, the browser need to know what it is, so you need a server side code
0
 

Author Comment

by:rbhargaw
ID: 40411107
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
ID: 40411537
when you open a pdf in a mobile, the pdf is generaly not opened with your browser
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…

726 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