Solved

Opening a pdf file in AngularJS

Posted on 2014-10-24
3
2,269 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 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
This article discusses how to create an extensible mechanism for linked drop downs.
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

617 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