Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Pagination from "@77io/pagination";
- // Setup the basic options
- const baseUrl = wordpressRoot + "/wp-json/wp/v2/posts";
- const headers = {
- accept: "application/json"
- };
- const sub = Pagination(baseUrl, headers)
- .subscribe((response: any) => {
- console.log("I got the first page!");
- console.log(response);
- sub.unsubscribe();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement