Reputation: 306
I am learning angular2
with typescript for developing mobile app. Trying to write logs and store them in device location.
I am using cordova file plugin to achieve this but when I try to get the directory with window.resolveLocalFileSystemURL, browser throws error "window.resolveLocalFileSystemURL" is not a function.
Upvotes: 2
Views: 3101
Reputation: 1088
In that case, use it like following -
window['resolveLocalFileSystemURL']
Your code would then look like this -
window['resolveLocalFileSystemURL'](folderpath, function(dir) {
// Your code goes here
});
Upvotes: 2