a sample client for the pods-json-api
using Angular.js
you take
- Wordpress as a backend
- Pods for storing custom data types and their relations
- AngularJS for creating a completely independent UI that looks nothing like a CMS
and glue them together using various pieces
- WP-API for enabling a JSON-based API for Wordpress
- pods-json-api for accessing your Pods
- wp-pods-api.js from this project, so you can use it in your own Angular.js app
to make things easier, this repo also contains a small Angular.js app that can list, add, edit and delete pods from your existing wordpress installation.
This assumes that you want your Angular App and the Wordpress Backend to live in 2 separate locations, which can even be different domains if you enable CORS.
- install Wordpress
- install Pods as a plugin
- install WP-API as a plugin (until it's merged with WP Core)
- install pods-json-api as a plugin
- create a new Pod
- install the base-auth-plugin
- create a new user that will be user for http basic auth combination (or use your admin account from first install ;-) )
- clone this repository into a folder of your choice
- edit the settings in the config() block of your main app.js
- APIend
- podTypes
- auth header
- run
grunt:serve
- check out the list of Pods in your browser at
http:// localhost:3000
- add, edit and delete them
- use Chrome DevTools or Firebug for seeing all the details
- use Postman for trying things out when you are stuck with the Wordpress or Pods API
a few words about how things fit together
feel free to send pull requests, add issues and use this code to your heart's delight