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 have been following your SPA with Angular and WordPress and I hit a wall when I get to adding custom data to the API response and displaying it. When I add register_api_field() to function register_new_field() I get this error:
Error: [$resource:badcfg]
This error is saying that $resource expects an array, but its getting an object. I do have Posts.query() in the first wpApp.controller(), but when I change Posts.query() to Posts.get() that did not change anything and Posts.query() is what you have in the tutorial.
Hi Roy,
I have been following your SPA with Angular and WordPress and I hit a wall when I get to adding custom data to the API response and displaying it. When I add
register_api_field()
tofunction register_new_field()
I get this error:Error: [$resource:badcfg]
This error is saying that $resource expects an array, but its getting an object. I do have Posts.query() in the first wpApp.controller(), but when I change
Posts.query()
toPosts.get()
that did not change anything andPosts.query()
is what you have in the tutorial.I have the code I am working with here in my repo:
https://github.com/ldco2016/angular-spa
How do I write this to eliminate this bug?
The text was updated successfully, but these errors were encountered: