Here is the code-- todo-service.js
tx.executeSql("CREATE TABLE IF NOT EXISTS tasks (task_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, task_name VARCHAR(100), task_content VARCHAR(500) )",[]);
function setTasks(tname, tcontent){
return promisedQuery("INSERT INTO tasks(task_name, task_content) VALUES ('" + tname + "," + tcontent + "') ", defaultResultHandler, defaultErrorHandler);
}
set: function(t_name, t_content) {
return setTasks(t_name, t_content);
},
In todo.js
// Called when the form is submitted
$scope.createTask = function(task) {
SQLService.set(task.title, task.content);
$scope.loadTask();
$scope.taskModal.hide();
task.title = "";
};
but not working??
by the way how can i delete sqlite database.