While attempting to use the Cordova File Transfer plugin and I could not obtain the app data folder without some difficulty.
- When using “cordova.file.dataDirectory” I received the error “cannot find name ‘cordova’”
- Tried ‘typings install cordova’ with some luck. Received the error “no property File on type Cordova”
- Included ‘declare var cordova;’ at the top of my provider to override the typings. Works now.
Everything works but have I done this correctly? Seemed like a lot of work for something that should be trivial: