The promise library of the [tag:rsvp.js] suite
Questions tagged [rsvp-promise]
52 questions
2
votes
2 answers
Uncaught ReferenceError: RSVP is not defined , error while using require.js with rsvp
I am working on a demo showing the error handling in promises using rsvp.js. Everything seemed fine, till I used the CDN url for rsvp.js in a tag. Now since I have require.js for module loading in my application, I tried loading the rsvp.js module…

VishnuNair
- 121
- 4
- 12
2
votes
1 answer
Ember.RSVP.All error Array Methods must be provided an Array
Cross-posted from discuss.emberjs.com
I'm trying to save a model then upon successful save save some additional models related to the intial model. These are in standard input fields that I can't/don't know how to bind to ED so I'm just using…

ultimatemonty
- 211
- 1
- 13
2
votes
1 answer
How to chain a RSVP promise and return the original reject/success functions?
I have a simple rsvp helper that lets me wrap an ajax call as a simple promise
var PromiseMixin = Ember.Object.create({
promise: function(url, type, hash) {
return new Ember.RSVP.Promise(function(resolve, reject) {
…

Toran Billups
- 27,111
- 40
- 155
- 268
1
vote
1 answer
Angular POS Print Issue
My requirement: Print without print preview angular 6
Only solution i found
Angular 2 Raw Printing Service
I am using think link for Angular POS print
Do i have any other alternatives?
.ts code
printInvoice() {
…

Coder
- 359
- 1
- 7
- 14
1
vote
0 answers
How to signal the caller about the state of a promise
I have Ember code where the backend API calls are abstracted into a
separate service. This service uses ember-ajax library for making
backend calls.
This service sets up the common headers, handles the
timeout errors, and 4xx/5xx errors. And…

Robin Bajaj
- 2,002
- 4
- 29
- 47
1
vote
1 answer
Resolve array of promises node.js
I am new to promises, I am trying to use RSVP promises in Node.js with PostgreSQL and I am doing it wrong, most probably.
Any suggestions on how to fix that or how to improve the code are appreciated.
What I try to achieve is: after receiving data -…

sub-zero
- 66
- 1
- 8
1
vote
1 answer
Ember isn't always loading belongsTo
I can't seem to workout how to load relationships properly in Ember. The user model only returns some of the time. If I refresh the page there seems to be a 50/50 chance the value will be null, or it will resolve correctly.
I understand in the…

Chris
- 3,437
- 6
- 40
- 73
1
vote
2 answers
how to resolve promise value as a normal value
How can we resolve promise to a normal number value .
I have use case in protractor automation in the first i have to call a asynchronous operation then that result value which should not be a promise .
I am using protractor framework
EDIT
var…

Vivek
- 151
- 2
- 14
1
vote
1 answer
Unable to test rsvp promises in jest
I'm stuck with writing unit tests for my code that uses rsvp promises.
I tried to use pit tests but had no luck in making tests pass for rsvp, however embedded promises work just fine:
//jest.autoMockOff(); - even with this rsvp test is…

Alex
- 2,916
- 3
- 22
- 27
1
vote
1 answer
Correct way of handling context in Promise
There are a few posts on the topic, but couldn't find one that explains the concept of context in Promises. Lets start with some code (this is taken from an Ember.js module and simplified, but could be any JS code that supports…

MojoJojo
- 3,897
- 4
- 28
- 54
1
vote
1 answer
Ember: How to get computed properties from a nested model?
First: I have no idea how to work with promises in Ember.js.
I want to call a property of my controller which depends on async model-data which is also nested.
Also, my model looks something like that:
+-------------+ +------------+…

EchtFettigerKeks
- 1,692
- 1
- 18
- 33
1
vote
3 answers
Do I always need catch() at the end even if I use a reject callback in all then-ables?
I am putting catches at the end, but they are returning empty object in one particular instance at least. Is a catch necessary for anything unbeknownst, or is it just screwing me up?
$( document).ready(function(){
app.callAPI()//a chainable a…

blamb
- 4,220
- 4
- 32
- 50
1
vote
1 answer
Ember RSVP.Promise resolve function return undefined
I have function in my adapter "findQuery" the function need to GET data from the server and return it.
the function:
findQuery: function(store, type, query) {
var userId = query['user_id'];
delete query['user_id'];
if (this.sortQueryParams)…

Cuzi
- 1,026
- 10
- 16
1
vote
4 answers
How to convert nested setTimeouts to promises
Using rsvp.js or any other promises/A+ implementation how can I turn code like...
console.log('step 1');
setTimeout(function() {
console.log('step 2');
setTimeout(function() {
console.log('step 3');
}, 100);
}, 300);
into a promises…

Wilfred
- 799
- 2
- 16
- 26
1
vote
1 answer
Does Ember.RSVP.all.then take 1 or 2 parameters?
I'm creating a function that sends off a bunch of promises and I want to let the user know what happened when they have all resolved. But, I'm not sure what parameters Ember.RSVP.all.then() should take. Right now I have something like…

spinlock
- 3,737
- 4
- 35
- 46