ngCordova FileOpener2 Problem


I am building an iOS app and I need to read a pdf.
I am following the ngCordova documentation for the FileOpener2 plugin, but nothing is happening.

I have :

module.controller('NewsCtrl', function ($cordovaFileOpener2) {

     ).then(function() {
     }, function(err) {
          console.log('Error' + err );


I run it just fine, and see the success message but no app is launched. Am I missing something? Would appreciate the help.



I am running the app in the iOS emulator in livereload. After making changes to the files the app refreshed on the tab with the controller and got the following error.

Error: undefined is not an object (evaluating 'cordova.plugins.fileOpener2')