I was wondering if there is a way in SPFX to get the library by the current url? Lets say "/sites/CustomerSite/Shared%20Documents/Forms/AllItems.aspx"
Asked
Active
Viewed 723 times
1 Answers
1
Below code works by @pnp/sp.
sp.web.getList("/sites/lee/Shared%20Documents/Forms/AllItems.aspx").get().then(data => {
console.log(data);
}).catch(err => {
console.log(err);
});

Lee
- 5,305
- 1
- 6
- 12