Opening a pdf file in AngularJS

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");
}
rbhargawAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
leakim971Connect With a Mentor PluritechnicianCommented:
that will not work, the browser need to know what it is, so you need a server side code
0
 
rbhargawAuthor Commented:
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
 
leakim971PluritechnicianCommented:
when you open a pdf in a mobile, the pdf is generaly not opened with your browser
0
All Courses

From novice to tech pro — start learning today.