Closed ghost closed 2 years ago
Have a look at this section of the docs - https://github.com/jeffsebring/angular-wp-api#set-theme-support
It makes reference to add_theme_support
https://codex.wordpress.org/Function_Reference/add_theme_support, which is necessary for the plugin to run. This plugin does nothing (including create your missing object) if you have not set it's theme support from either your theme, a plugin, or mu-plugin.
I don't believe you should have a reference to wpAPIData. When I put that in (following this example) I had an error because wpAPIDataProvider was missing. When I removed the reference but kept in wpAPIResource it worked fine.
Hi, I'm trying to utilize angular-wp-api, and have some issue with 'wpAPIData'. I read your answer to @joao-parana, but still not fully understand the way of solution. I already added within my wordpress json-rest-api/plugin.php the code you specified as is, but not sure where to add the theme support for 'angular-wp-api' ?? then on running angular app the ctrl recognized 'wpAPIResource' but not 'wpAPIData' obj, receiving this error: ReferenceError: wpAPIData is not defined
where is the mistake?