S1E05: The best way to make SharePoint restAPI calls with angularJS for SP onprem
DeShon Clark
Chief AI Automation Architect | Microsoft Copilot, & Azure A.I. Studio | Microsoft 365 Architect | Senior Power Platform Engineer
Here is a repeatable and robust pattern needed for calling SharePoint OOB restAPI with angularJS.
SharePoint restAPI calling is one of those instances where you will want to encapsulate the heavy lifting in a private services method.
Actually, getting the list data via REST is pretty straight forward, but it’s something that you will do frequently, so having a reusable pattern makes sense.
On the other hand, grabbing the data from a publishing image site column, is not as straight forward as we would hope, but we also have a “slick” private method that we can leverage to get this job done elegantly (…though there is one caveat, which we will cover in the video).
You will notice that we keep all the “nasty” code in the service layer, which allows us to keep our components squeaky clean.
Note: the service method is also pass-through, meaning that when you need to add a new site column (because the requirements changed, or enhancements to the feature) you will not need to update the service method nor the controller (just reference the new site column in the template).
Ok, enough with the promises…let’s take a look.
#spEasyDev #sp2013 #sp2016 #ngsharepoint #custommasterpage #sharepoint2013 #sharepoint2016 #sharepoint #sharepointandangularjs
Hands-on Practice Lead/Fractional Strategy Consultant/Entrepreneur
6 年DeShon, reading your all tech. posts on LinkedIn, Great job done.