16,009,598 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by abc123aaaa (Top 19 by date)
abc123aaaa
17-Mar-17 5:27am
View
Please don't waste time.If you know the solution please share it otherwise leave it for others if someone know the solution.
abc123aaaa
17-Mar-17 4:49am
View
yes
abc123aaaa
15-Mar-17 3:53am
View
Deleted
But i didn't get any solution how to do it.
abc123aaaa
14-Mar-17 22:55pm
View
it gives
Uncaught TypeError: Cannot read property 'start' of undefined
at pdf2json.js:12
and
Uncaught Error: Mismatched anonymous define() module: [object Object]
http://requirejs.org/docs/errors.html#mismatch
at makeError (require.js:61)
Actually i'm using angular in a cordova SPA.
abc123aaaa
14-Mar-17 14:17pm
View
Deleted
Actually i'm using angular in a cordova SPA.
abc123aaaa
14-Mar-17 14:16pm
View
Deleted
it gives
Uncaught TypeError: Cannot read property 'start' of undefined
at pdf2json.js:12
and
Uncaught Error: Mismatched anonymous define() module: [object Object]
http://requirejs.org/docs/errors.html#mismatch
at makeError (require.js:61)
abc123aaaa
12-Feb-17 8:46am
View
ok
abc123aaaa
12-Feb-17 8:24am
View
Can I do it using AngularJS.
abc123aaaa
12-Feb-17 7:59am
View
Is there any other way to do this in Android.
abc123aaaa
12-Feb-17 7:58am
View
Yes.. Documentation says pause and resume work's only in iOS. Also checked Cordova plugin media with compression. It gives Media undefined error.
abc123aaaa
12-Feb-17 5:06am
View
recording continues after pause.stops only when i click stop.
abc123aaaa
18-Sep-16 3:35am
View
app.controller("myctrl", function ($scope, $timeout, $filter, $q ) {
$scope.abc = function()
{
function isPromiseLike(obj) {
return obj && angular.isFunction(obj.then);
}
serial({ task1, task2 });
function serial(tasks) {
var prevPromise;
var error = new Error();
angular.forEach(tasks, function (task, key) {
var success = task.success || task;
var fail = task.fail;
var notify = task.notify;
var nextPromise;
//First task
if (!prevPromise) {
nextPromise = success();
if (!isPromiseLike(nextPromise)) {
error.message = "Task " + key + " did not return a promise.";
throw error;
}
}
else
{
//Wait until the previous promise has resolved or rejected to execute the next task
nextPromise = prevPromise.then(
/*success*/function (data) {
if (!success) { return data; }
var ret = success(data);
if (!isPromiseLike(ret)) {
error.message = "Task " + key + " did not return a promise.";
throw error;
}
return ret;
},
/*failure*/function (reason) {
if (!fail) { return $delegate.reject(reason); }
var ret = fail(reason);
if (!isPromiseLike(ret)) {
error.message = "Fail for task " + key + " did not return a promise.";
throw error;
}
return ret;
},
notify);
}
prevPromise = nextPromise;
});
return prevPromise || $delegate.when();
}
function task1() {
var d = $q.defer();
$timeout(function () {
//some task
d.resolve();
}, 1000);
return d.promise;
}
function task2() {
var d = $q.defer();
$timeout(function () {
//some task
d.resolve();
}, 1000);
return d.promise;
}
}
});
cordova app goes white screen when using $q.defer in angularjs.It works fine when running in ripple but not working in device.
abc123aaaa
18-Sep-16 2:50am
View
i think nobody knows the ans of this...
abc123aaaa
18-Sep-16 1:42am
View
ok,i updated prev quest. plz suggest any solution
abc123aaaa
18-Sep-16 1:42am
View
Deleted
ok,i updated prev quest. plz suggest any solution
abc123aaaa
17-Sep-16 9:59am
View
Deleted
now using angular.min.js only still not working
abc123aaaa
17-Sep-16 9:29am
View
Deleted
yes both angular.js and angular.min.js
abc123aaaa
14-Sep-16 14:18pm
View
i'm not asking for that also..
abc123aaaa
14-Sep-16 2:41am
View
Deleted
i have two functions like :
function task1(){
$scope.db.transaction(function (transaction) {
transaction.executeSql("insert into tbl1(---) values (?,?,?)", []);
});
}
function task2(){
$scope.db.transaction(function (transaction) {
transaction.executeSql("select * from tbl1 orderby col1 desc limit 1", [], function (transaction, result) {
//some code
});
});
}
using your code it is ok with task1 and also going inside task2 but it is not going inside callback function of task2
Show More