Questions tagged [ic-ajax]

An Ember.Js-fiendly AJAX wrapper

-friendly .wrapper.

  • returns promises
  • makes apps more testable (resolves promises with Ember.run)
  • makes testing ajax simpler with fixture support

ic-ajax on Github

6 questions
3
votes
1 answer

Why is ic-ajax not defined within certain functions in Ember CLI?

Forgive my ignorance, but I can't get ic-ajax working inside of certain functions. Specifically, I'd like to get a test like this working, but for Ember CLI: e.g. http://coderberry.herokuapp.com/testing-your-ember-application#30 I can call ajax…
hammyhamhams
  • 108
  • 1
  • 8
3
votes
1 answer

Unit testing actions in ember controller that return promises

I have a controller that performs an asynchronous operation, which I would like to test: /*globals Ember, momnent*/ import { raw as icAjaxRaw } from 'ic-ajax'; //... actions: { foo: function() { var req = icAjaxRaw({ …
bguiz
  • 27,371
  • 47
  • 154
  • 243
1
vote
2 answers

Should I and how to transitionToRoute in a promise callback

In an Ember controller, I want to call my API to create a user and on success, transitionToRoute. This is what I currently want to work: import ajax from "ic-ajax"; import Ember from "ember"; export default Ember.Controller.extend({ actions: { …
nevets138
  • 80
  • 8
1
vote
3 answers

How does ember data access fixtures declared with ic-ajax's declareFixture?

I am attempting to use ember-cli and ember-cli-ic-ajax for Ember Data fixtures. I have imported ic.ajax.defineFixture as icDefineFixture. icDefineFixture('/users', { response: { email: 'user@example.com' }, textStatus: 'success', jqXHR:…
Kevin Bullaughey
  • 2,556
  • 25
  • 37
0
votes
1 answer

Upload photo using Ember addon ember-plupload

I have used ember-plupload for uploading the images.Now I have written a component for this.I am able to open and select the images from my machine.But I am lost what to do next.I have to send the post request to my server endpoint with body params…
nandanself
  • 835
  • 8
  • 21
0
votes
1 answer

What does the ic stand for in ic-ajax

Is ic in ic-ajax an acronym or a phonetic pronunciation of something? Can't find anything on google or the library README.md.
justinaray
  • 118
  • 10