i am trying to do something \"nice\" in AngularJS with my so-so JS skills and i would like to hear how would you feel or improve/refactor following:
angular.
http://rburns.paiges.net/about/ anwers following:
function getCategories(){
return promisedQuery('SELECT * FROM CATEGORIES', defaultResultHandler, defaultErrorHandler);
}
function getDishes(){
return promisedQuery('SELECT * FROM DISHES', defaultResultHandler, defaultErrorHandler);
}
function defaultResultHandler(deferred) {
return function(tx, results) {
var len = results.rows.length;
var output_results = [];
for (var i=0; i