Showing posts with label ngx-wordpress. Show all posts
Showing posts with label ngx-wordpress. Show all posts
<img src="" height="150" width="150"></img> <br> ngx-wordpress


October 29, 2017
This library is designed to make it easy for your Angular application to request specific resources from a WordPress install.
  • :electric_plug: WordPress Rest API WordPressModule.forRoot(WordPressDomain)
  • :european_castle: WordPress RX Service
    • Get post wpService.collection().posts().get(postQueryArgs).subscribe(res => posts =
    • Add new post wpService.collection().posts().add(newPost).subscribe(res => newPost = )
    • Get post by Id wpService.model().posts().get(postId).subscribe(res => post =
    • Update page wpService.model().pages().add(pageId, page).subscribe(res => page = )
    • 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"> {{ post.title.rendered }} </li>  
     <!--  Get post by ID  -->  
     <div [wpModel]="'pages'" [wpId]="123" [wpResponse]="res = $event"> {{res?.data.title.rendered}} </div>  

  • :vertical_traffic_light: Authentication
    • :old_key: Basic authentication wpService.auth().basic(username, password, remember?)
    • :cookie: Cookies authentication wpService.auth().cookies()
  • :icecream: Helper functions to access data in post responses
  • Photon CDN
  • :hammer_and_wrench: Blog assests:

Wiki Documentation

Note: Special thanks to Murhaf Sousli
Disclaimer: The blog is created to share angular directives information to geek, curious Angular Developers.