waqas26
September 9, 2014, 9:59am
1
i am new in ionic framework and i want to download images using rest api and save it in root folder (img) in ionic framework please give me any idea how can i do … please guide my thank you.
You should check out cordova’s file plugin and ng-cordova’s wrapper for it
// install : cordova plugin add cordova-plugin-file
// link : https://github.com/apache/cordova-plugin-file
angular.module('ngCordova.plugins.file', [])
.constant('$cordovaFileError', {
1: 'NOT_FOUND_ERR',
2: 'SECURITY_ERR',
3: 'ABORT_ERR',
4: 'NOT_READABLE_ERR',
5: 'ENCODING_ERR',
6: 'NO_MODIFICATION_ALLOWED_ERR',
7: 'INVALID_STATE_ERR',
8: 'SYNTAX_ERR',
9: 'INVALID_MODIFICATION_ERR',
10: 'QUOTA_EXCEEDED_ERR',
11: 'TYPE_MISMATCH_ERR',
12: 'PATH_EXISTS_ERR'
})
This file has been truncated. show original