Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Is there a way of updating apiFetch after it has been set? #11

Open
arnvanhoutte opened this issue Nov 27, 2018 · 1 comment
Open

Is there a way of updating apiFetch after it has been set? #11

arnvanhoutte opened this issue Nov 27, 2018 · 1 comment
Assignees

Comments

@arnvanhoutte
Copy link

At the moment the apiFetch function has to be set at the initialization of the page.
The problem I have with this is that I cannot use my angular services then because angular has not been loaded at that time. I was wondering if there maybe could be a way to set apiFetch later on, maybe at the initialization of the editor? Eg like this:

  import { apiFetch }  from 'src/app/new-api-fetch'
  import { editPost } from '@frontkom/gutenberg-js';
  editPost.initializeEditor('editor', 'page', 1, settings, {}, apiFetch);
@perandre
Copy link
Member

What do you think, @SofiaSousa ?

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

No branches or pull requests

3 participants