FileTransfer is not defined


I am using Transfer plugin in my ionic 2 app for sending files. While testing the app, I had difficulty in mocking Transfer. Please take a look into this <a href="https://stackoverflow.com/questions/41800772/faking-a-module-in-angular-2-test" rel="nofollow">problem</a> to understand the context . After that discussion , I decided to inject Transfer in my service.

So I added Transfer in my providers in app.module.ts.And injected it into my service.

constructor( public transfer: Transfer){}

But this leads to an error. FileTransfer is not defined. I guess its because there is no browser support for this plugin. So I am in a tough spot, I do not know how I can make working testable code. Any ideas?


In ionic cordova plugin are not supported for browser Because the browser cant access native api of the os so you need to develop the app and deply it in your Android or ios device .


  • Microdata and multiple opening in a day
  • How to access a value using a space-separated key?
  • Create a demo of my static program analyzer as a web application? [without sending .jar files to cli
  • Translating route segments with ZF's gettext adapter
  • Set up the Android-Facebook sdk for Netbeans
  • What is the difference between Google Developers Console project and a Google **Play** Developers Co
  • Best style for iterating over a small number of items in Python?
  • Date format change angular 2
  • Calling right overload of the java method from jython
  • Change behaviour of Print button in ReportViewer C#
  • jQuery and Uploadify session in the php file
  • Angular2 emit event up to the DOM tree
  • How do I include screenshots of the full page in my serenity report (and not only of the viewport) u
  • How to get file download speed (transfer rate) with php?
  • Do I have to inject the service in the unit test if I cal testBed.get() previously?
  • How to select table rows/complete table?
  • What is this strange character in chrome's resource css viewer?
  • Running jasmine tests for a component with NgZone dependency
  • iOS Cordova first plugin - plugin.xml to inject a feature
  • unable to get jsonEncode in magento2
  • Why are YouTube videos using 'youtube.com/v' not loading
  • Spring boot 2.0.0.M4 required a bean named 'entityManagerFactory' that could not be found
  • Specifying Castle WCF Integration Facility Endpoint Behavior per Endpoint
  • How can I set a binding to a Combox in a UserControl?
  • Create DicomImage from scratch using Dcmtk
  • How to define and use opencv mat of user type
  • copying resource to sdcard gives a damaged file in android
  • PHP - How to update data to MySQL when click a radio button
  • Is there a amazon webstore API for customers?
  • angularjs unit test when to use $rootScope.$new()
  • Cassandra Data Model
  • Calling of Constructors in a Java
  • Circular dependency while pushing http interceptor
  • JTable with a ScrollPane misbehaving
  • Angular 2 constructor injection vs direct access
  • Getting Messege Twice Using IMvxMessenger
  • unknown Exception android
  • failed to connect to specific WiFi in android programmatically
  • Python/Django TangoWithDjango Models and Databases
  • How can I use threading to 'tick' a timer to be accessed by other threads?