Git Product home page Git Product logo

ngx-wordpress's Introduction

Angular WordPress Module

This library is designed to make it easy for your Angular application to request specific resources from a WordPress install.

  • 🔌 WordPress Rest API WordPressModule.forRoot(WordPressDomain)

  • 🏰 WordPress RX Service

    • Get post wpService.collection().posts().get(postQueryArgs).subscribe(res => posts = res.data)
    • Add new post wpService.collection().posts().add(newPost).subscribe(res => newPost = res.data )
    • Get post by Id wpService.model().posts().get(postId).subscribe(res => post = res.data)
    • Update page wpService.model().pages().add(pageId, page).subscribe(res => page = res.data )
    • Delete post wpService.model().posts().delete(postId).subscribe(res => res)
  • 🤹‍ Wordpress Directives

<!--   Get collection of posts   -->
 
<ul [wpCollection]="'posts'" [wpArgs]="postQueryArgs" (wpResponse)="posts = $event">
  <li *ngFor="let post of res.data"> {{ post.title.rendered }} </li>
</ul>
    
<!--   Get post by ID   -->

<div [wpModel]="'pages'" [wpId]="123" [wpResponse]="res = $event"> {{res?.data.title.rendered}} </div>
  • 🚦 Authentication

    • 🗝 Basic authentication wpService.auth().basic(username, password, remember?)
    • 🍪 Cookies authentication wpService.auth().cookies()
  • 🍦 Helper functions to access data in post responses

  • Photon CDN

  • 🛠 Blog assests:


npm Build Status npm

Wiki Documentation

Author

Murhaf Sousli

ngx-wordpress's People

Contributors

murhafsousli avatar greg-klein avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.