Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does Messenger work with Jquery promise? #114

Open
gregveres opened this issue Jun 10, 2016 · 0 comments
Open

Does Messenger work with Jquery promise? #114

gregveres opened this issue Jun 10, 2016 · 0 comments

Comments

@gregveres
Copy link

HI

I am wrapping $.ajax in a function that returns $.ajax's JQueryPromise. I then pass that to expectPromise but I get m_opts.action.apply is not a function. Am I doing something wrong or does Messenger not work with JQuery's Promise implementation? I have read that JQuery's Promise implementation is not compliant with Promises/A+.

Here is my call to expectPromise: (this is typescript code).

            Messenger().expectPromise(
                CourtGroupsService.getCourtGroup(this.CourtGroupId()).done((group: CourtGroup) => {
                    this.map(group);
                }),
                {
                    successMessage: 'Court Group reloaded from the server',
                    progresMessage: 'false'
                });

CourtGroupsService.getCourtGroup() returns a JQueryPromise.

Thanks
Greg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant