Skip to content

bjoernklose/angular-wordpress-pods

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

angular-wordpress-pods

a sample client for the pods-json-api using Angular.js

Introduction

main ingredients

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.

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.

server in location 1

  1. install Wordpress
  2. install Pods as a plugin
  3. install WP-API as a plugin (until it's merged with WP Core)
  4. install pods-json-api as a plugin
  5. create a new Pod
  6. install the base-auth-plugin
  7. create a new user that will be user for http basic auth combination (or use your admin account from first install ;-) )

client in location 2 // localhost

  1. clone this repository into a folder of your choice
  2. edit the settings in the config() block of your main app.js
    • APIend
    • podTypes
    • auth header
  3. run grunt:serve
  4. check out the list of Pods in your browser at http:// localhost:3000
  5. add, edit and delete them
  6. use Chrome DevTools or Firebug for seeing all the details
  7. use Postman for trying things out when you are stuck with the Wordpress or Pods API

Usage

a few words about how things fit together

Contributing

feel free to send pull requests, add issues and use this code to your heart's delight

License

MIT

About

a sample client for the pods-json-api using Angular.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published