Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Opening a pdf file in AngularJS

Posted on 2014-10-24
3
Medium Priority
?
2,535 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 2000 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

Independent Software Vendors: 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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses how to create an extensible mechanism for linked drop downs.
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…
The viewer will learn how to dynamically set the form action using jQuery.

704 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