Does this addon work with ember octane versions ?
SandeepJoel opened this issue · 3 comments
SandeepJoel commented
Got the error "Could not find module jquery
imported from ember-ajax/utils/ajax
" while executing the below function call.
return this.ajax
.request('/api/token', {
method: 'POST',
// url: '/api/token',
data: payloadData,
})
.then((result) => {
return result.token;
})
.catch(function (error) {
console.log('Api failure', error);
});
Doing ember install @ember/jquery
seems to fix this issue. Why is this fix needed ?
webark commented
do you really want to know..? 🥴
SandeepJoel commented
Atleast have we documented this somewhere in this repo ?
webark commented
ember-ajax/addon/utils/ajax.ts
Lines 1 to 6 in 5520bdf
you can see here that it's just importing jquery to use as its ajax method.
Don't think it's documented anymore. There's an ember-ajax-fetch which has a very similar api but uses fetch.