jeffsebring / angular-wp-api

An AngularJS Client for WP-API
124 stars 15 forks source link

How do i query the post endpoint with custom parameters? #8

Closed vimes1984 closed 10 years ago

vimes1984 commented 10 years ago

Hello @jeffsebring how do go about passing query parameters to the /post endpoint, like so: /post?type=&context=edit the syntax is driving me mad...

vimes1984 commented 10 years ago

stupid question! wpAPIResource.query( { param1: 'posts', type: 'listing', context: 'edit'}, function(data) { console.log(data); }, function(e) { console.log(e); });

jeffsebring commented 10 years ago

Glad you were able to figure it out!

There are no stupid questions imo.

vimes1984 commented 10 years ago

I'm using this project quite a lot and it's really usefull thank you for taking the time to work this out:D! your right no questions are stupid but still it felt a bit... I also spent hr's trying to figure out the syntax to add post_meta at the same time...