You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've followed the documentation to add the initializer in fastboot/initializer/ajax.js
exportdefault{name: 'ajax-service',initialize(){// noop// This is to override Fastboot's initializer which prevents ember-fetch from working// https://github.com/ember-fastboot/ember-cli-fastboot/blob/master/fastboot/initializers/ajax.js}}
and adding the AdapterFetch mixin to my adapters/application.js
But I cannot determine the correct path to resolving the issue.
In the comments of the issue there is a suggestion that this is fixed for ember-data but I don't see how to achieve this.
The PR seems out of date now due to so many subsequent commits so I tried to fork the ember-fetch repo and make the changes myself.
So I added ember-fetch-adapter as a dependency to the package.json and updating addon/mixins/adapter-fetch.js to use the adapter instead, by including the service in the mixin
adapter: service(),
and using the adapter service in the fetch request
I've followed the documentation to add the initializer in
fastboot/initializer/ajax.js
and adding the
AdapterFetch
mixin to myadapters/application.js
But am still getting an error message
TypeError: Only absolute URLs are supported
Looking into this error I've seen that there is already an issue relating to it
#110
And also a PR which looks to address it
#128
But I cannot determine the correct path to resolving the issue.
In the comments of the issue there is a suggestion that this is fixed for
ember-data
but I don't see how to achieve this.The PR seems out of date now due to so many subsequent commits so I tried to fork the
ember-fetch
repo and make the changes myself.So I added
ember-fetch-adapter
as a dependency to thepackage.json
and updatingaddon/mixins/adapter-fetch.js
to use the adapter instead, by including the service in the mixinand using the adapter service in the fetch request
But this now gives another error
Error: Assertion Failed: Attempting to inject an unknown injection: 'service:adapter'
I'm now at a loss as to how I can resolve this and to get
ember-fetch
working withember-data
and Fastboot.I'm open to any solution, is this absolute URL issue fixable yet?
The text was updated successfully, but these errors were encountered: