The promise library of the [tag:rsvp.js] suite
Questions tagged [rsvp-promise]
52 questions
1
vote
1 answer
Ember.js: route returning multiple models including a promise, gives error
I am trying to return multiple models for a route, and, yes, I am using RSVP.Hash (GitHub link):
App.GamesIndexRoute = Ember.Route.extend({
model: function () {
return new Ember.RSVP.Hash({
player:…

Asfand Qazi
- 6,586
- 4
- 32
- 34
1
vote
1 answer
In TypeScript, how to use Promises with the RSVP implementation on Node.js
On Node.js, what is the proper way to use promises with TypeScript ?
Currently I use a definition file "rsvp.d.ts":
interface Thenable {
then(cb1: Function, cb2?: Function): Thenable;
}
declare module rsvp {
class Promise implements Thenable…

Paleo
- 21,831
- 4
- 65
- 76
1
vote
3 answers
EmberJS "this" changed in promise (find) callback
When I want to fetch an account from the server in an controller action e.g:
account: false,
actions: {
// When the oAuth popup returns this method will be called
fetchUser: function(id)
{
// Get the account from the…

Matthijn
- 3,126
- 9
- 46
- 69
1
vote
2 answers
Promise success callback not getting called after chaining promises
I am not able to get chained promises to work as per RSVP documentation. I have a case where I am trying to fetch some data from the server. If for some reason an error occurs, I want to fetch the data from a local file.
I am trying to chain…

blessanm86
- 31,439
- 14
- 68
- 79
1
vote
1 answer
Ember data sending ids as strings when saving belongsTo
I'm creating a cocktail app with the models "cocktail", "membership", and "ingredient". The cocktail and ingredient models are pretty self explanatory and the membership model is for objects that link a cocktail to an ingredient with…

Tobias
- 304
- 2
- 7
0
votes
1 answer
how to update controller after RSVP.allSettled
After all rsvp promises are done in ember controller, how can I save all error status in controller and update DOM? I got undefined 'this', controller no longer accessible.
export default class someController extends Controller {
@tracked…

s.w
- 17
- 4
0
votes
1 answer
RSVP Promises: Why does parent promise wait on non-chained inner promise?
We're using an older version of RSVP.js in several apps we built.
I expected this promise to resolve immediately while outputting "1", "2", and after 5 seconds "3". I thought the inner promise would be treated like a value.
new…

nogridbag
- 3,521
- 4
- 38
- 51
0
votes
0 answers
RSVP.hash - promise Not works like returning a object without promise
In my model I am retuning a data without a promise like :
import Ember from 'ember';
export default Ember.Route.extend({
model: function(params) {
return this.store.peekRecord('card-list', params.id ); //works
}
});
It works fine. But when…

user2024080
- 1
- 14
- 56
- 96
0
votes
2 answers
Ajax Promise on Property not returning data
I have an Ember controller with a simple property that should get a list of files from the server. Server-Side all good, data is returning and showing on console.
In controller I have:
imgFiles: new Ember.RSVP.Promise(function(resolve, reject) {
…

Jeff
- 6,895
- 1
- 15
- 33
0
votes
2 answers
Having nested promises and returning them in route won't update the route model and the template using that model
in my route model i need to send two requests (previous and latest) and on the response i grab their ids to send two other requests(baslineCpature and currentcapture). when i got the responses of both requests, i need to send two other…

user5471528
- 217
- 2
- 9
0
votes
2 answers
AJAX promise call handling
I have an Ember promise call as below;
var promise = new Ember.RSVP.Promise(function(resolve, reject) {
return $.ajax({
//want this common
url: requestUrl,
type: type, // HTTP method
dataType: dataType, // type of…

copenndthagen
- 49,230
- 102
- 290
- 442
0
votes
1 answer
Ember Promise chain not returning sum
I am working with Ember Data and trying to create a computed property equal to the sum all products in a store with their respective discounts applied. I am new to promise chaining and I believe that this is an issue with how I am formatting the…

Kyle Snell
- 81
- 1
- 1
- 11
0
votes
3 answers
Conditional promises in Ember.RSVP
I have a simple if else scenario where I need to do something if a variable is set otherwise just perform in the else part:
if(flag) {
doSomething();
}
doNextThing(someParam);
If flag is set, then I must doSomething() and doNextThing()
Both…

MojoJojo
- 3,897
- 4
- 28
- 54
0
votes
2 answers
Emberjs and promises
My coding style may be bad as I am still learning. I need to know how to handle passing extra parameters to chained promises in Emberjs.
What I am trying to achieve.
Lots of promises in my route was looking messy so I decided to write function for…

Rigel
- 882
- 1
- 11
- 32
0
votes
1 answer
Best way to debug promises running in parallel
Am developing backend of an app using nodejs+express and using RSVP for promises.
Problem : whenever there is an error or exception in one of the functions that is unexpected the execution is stuck. Is there any way i can find which one of the…

Steve
- 19
- 1
- 1
- 6