Many thanks for all your tutorials that have greatly helped and helping us in so many ways. Please, i have problem at hands to solve though i\'m a newbie in angular/ionic.>
You may want to consider using Cordova sqlite storage. Link
To do it,
Install the plugin into your ionic project folder via:
cordova plugin add https://github.com/brodysoft/Cordova-SQLitePlugin.git
Get ng-cordova.min.js and add into ur javascript directory, add this following line of code into your index.html.
Inject into your angular module(app.js) via:
angular.module('starter', ['ionic', 'ngCordova'])
Create a database via :
.controller('YourController', function(....., $cordovaSQLite){
var db = $cordovaSQLite.openDB("database.db");
$cordovaSQLite.execute(db, "CREATE TABLE IF NOT EXISTS form (id integer primary key, name text, address text, telephone text)");
An Insert Example:
$scope.insert = function(name, text, telephone) {
var query = "INSERT INTO form (name, text, telephone) VALUES (?,?,?)";
$cordovaSQLite.execute(db, query, [name, text, telephone]).then(function(res) {
console.log("success!");
}, function (err) {
console.error(err);
});
}
Your image file is then able to store as a blob and have fun ! (: