angularjsを使用して3つの関数を順番に実行したい。angularjsで関数を順番に実行する方法
関数doThis(コールバック){
$scope.db.transaction(function (transaction) {
transaction.executeSql("insert into tbl1(---) values (?,?,?)", []);
});
if (typeof callback === 'function') {
callback();
}
}
function doThat() {
$scope.db.transaction(function (transaction) {
transaction.executeSql("select * from tbl1 orderby col1 desc limit 1", [], function (transaction, result) {
//some code
});
});
}
doThis(doThat);
仕上げdoThis後よりも第doThisを実行したい、doThatが実行されます。
あなたの質問を再フォーマットしてください! – d4rty
どのようにそれをフォーマットする..私はstackoverflowに新しい – abc
あなたのコードを共有してください。 –